Re: Why do form submissions need stripslashes() invocations?

From: Date: Mon, 10 Sep 2001 00:20:39 +0000
Subject: Re: Why do form submissions need stripslashes() invocations?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66638@lists.php.net to get a copy of this message
> 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). It is meant to be this way because so many scripts out there send form data directly to databases where these need to be escaped. You can change this behaviour with the magic_quotes_gpc directive in your php.in file. See http://www.php.net/manual/en/configuration.php -Rasmus

« previous php.general (#66638) next »