Re: Hidden Input and Quotes?

From: Date: Sat, 12 May 2001 09:10:34 +0000
Subject: Re: Hidden Input and Quotes?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-52556@lists.php.net to get a copy of this message
On Saturday 12 May 2001 04:20, Young Chi-Yeung Fan wrote: > If you have <input type="hidden" name="data" value="The word > &quot;here&quot; is in quotes." />, then when you submit your form, > $HTTP_POST_VARS["data"] or $HTTP_GET_VARS["data"] will be: > > The word \"here\" is in quotes. > > So you can put the value straight into MySQL. The slashes will not show > up in MySQL. The browser converted the &quot; into ", and PHP for some > reason (I still don't know why) adds slashes before your ' and " The reason is that in your php.ini there is an entry magic_quotes_gpc = on set this to 'off' and the slashes are gone. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Install once, run forever. Linux.

« previous php.general (#52556) next »