MichaelMackey Posted July 9, 2008 Share Posted July 9, 2008 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 Quote Link to comment Share on other sites More sharing options...
p2grace Posted July 9, 2008 Share Posted July 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
MichaelMackey Posted July 9, 2008 Author Share Posted July 9, 2008 Ah yes you were right. I had assumed it was something like that but I had been focusing in the wrong areas to fix it, it suddenly clicked when I read what you said. Thanks. Quote Link to comment Share on other sites More sharing options...
discomatt Posted July 9, 2008 Share Posted July 9, 2008 Also, urlencode() any data you're going to put in a URL query string. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.