Jump to content

[SOLVED] Retreiving a $_GET variable that has an apostraphe


MichaelMackey

Recommended Posts

Hi, as the title says I have an issue where I can get the $_GET variable to send the proper item to the URL, but if I try and retrieve it it will fail. 

 

So I need to get the value "St.%20John's" from my URL, but the GET can't seem to process it right and returns St.John\

 

Would the easiest method here just to assign a different value to the apostrophe and then reassign it later, or is there something I can do to get it to work?

 

Thanks

More than likely the variable has the slashes due to addslashes or mysql_real_escape_string and you're trying to echo it in an html form using value='' which of course will end the display after the apostrophe.  So your best bet is to probably add stripslashes() to the variable before displaying it.  If this doesn't help try posting some code so we can take a closer look.

 

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.