0

I have an issue.I can't fetch the query string value using php GET method .I am explaining my code below.

http://oditek.in/spesh/#/resetPass?m_i=bbc9a02e5e63f742

from the above URL i need to fetch the query string value for that i did like below.

$id=$_GET['m_i'];
echo  $id;

when i did echo this $id it showing me blank.Please help me to resolve this issue.

  • take note that after the `#`, the rest of it will not be caught by the server – Kevin Mar 30 '16 at 04:36
  • 1
    That's because you have # in the url. Anything present after # isn't considered. – Object Manipulator Mar 30 '16 at 04:36
  • 2
    Everything after `#` counts as url fragment and does not get sent to the server. Remove it. – Charlotte Dunois Mar 30 '16 at 04:37
  • actually i am using `Angular.js` for front end.By default the html5 mode is disable from the begining is there any other solution? –  Mar 30 '16 at 04:38
  • It really does not matter what you use as frontend. In the end the browser makes the HTTP request. Remove the hashtag. – Charlotte Dunois Mar 30 '16 at 04:41
  • 1
    Possible duplicate of [Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)](http://stackoverflow.com/questions/940905/can-i-read-the-hash-portion-of-the-url-on-my-server-side-application-php-ruby) – Eaten by a Grue Mar 30 '16 at 04:59
  • You can get the real url from Borwser Inspect Element. What I get is "Request URL:http://oditek.in/spesh/". – SuperBear Mar 30 '16 at 05:20
  • @CharlotteDunois : i removed the hash tag but the still the same issue is coming. –  Mar 30 '16 at 05:26
  • Are you sure you removed `#`? – itzmukeshy7 Mar 30 '16 at 05:29
  • yes,now url is like this `http://oditek.in/spesh/resetPass?m_i=bbc9a02e5e63f742`. –  Mar 30 '16 at 05:33

0 Answers0