Quotes in GET variables
| From: | Mark Rogers | Date: | Mon, 21 May 2001 11:53:08 +0000 |
| Subject: | Quotes in GET variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53698@lists.php.net to get a copy of this message | ||
If I submit a string to a script via GET which contains quotes, how should
they appear in my script?
Eg:
--- test.php ---
echo $HTTP_GET_VARS['test'];
Go to:
test.php?test=this+doesn%27t+work
.. and you get:
this doesn\'t work
(Char 27 is a single quote. Echoing $test gives the same result.)
I can use stripslashes lose the escape char, but should this be necessary?
I'm using v4.0.4pl1
--
Mark Rogers
Lose the -news in the email address if replying direct