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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to