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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.