Re: Why do form submissions need stripslashes() invocations?
| From: | nayco | Date: | Mon, 10 Sep 2001 07:55:20 +0000 |
| Subject: | Re: Why do form submissions need stripslashes() invocations? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66690@lists.php.net to get a copy of this message | ||
Heloorghhh !!!
Well, try to make a script with :
<?php
echo "bob says : \"hello, brother !!! \" ";
echo " bob says : "hello, brother !!! " ";
?>
then, look at the output to see where the error is !!!!
well, php's got to know which of the quotes means "end of string" an which
is a part of the string...
so, parts of the string must be backslashed in every function using it ....
when submitting a form php assumes that the string will be processed in a
function and protects it.
sorry for my medium english.
----- Original Message -----
From: Neil Zanella <nzanella@cs.mun.ca>
To: PHP General Mailing List <php-general@lists.php.net>
Sent: Monday, September 10, 2001 2:18 AM
Subject: [PHP] Why do form submissions need stripslashes() invocations?
>
> Hello,
>
> I would like to know why PHP adds slashes to the double quote,
> single quote, and backslash characters when submitting a form.
> In particular it would be nice if the PHP manual or some other
> manual mentioned this but I could not find any official
> documentation on this issue. Why does PHP add the
> slashes in the first place? (I'm using PHP 4.0.4pl1
> and don't know if this is just a bug or whether
> it was meant to be this way).
>
> Thanks,
>
> Neil
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>