javascript - Pass along & sign with href to php page help -


i have this:

    browse_cat.php?cat_gr='mopeds & traktors'"> 

the browse_cat.php contains fetch above "category":

    $cat=$_get['cat_gr'];     echo $cat; 

this echo outputs first word "mopeds". wont change if replace & &.

what problem here?

the adress bar when enter browse_cat.php shows:

  browse_cat.php?cat_gr='mopeds%20&%20traktors' 

thanks

take @ urlencode() , urldecode().
also, remove single quotes around query string.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -