Re: PROBLEM IN INSERTING TEXT WITH SINGLE QUOTE
| From: | Rasmus Lerdorf | Date: | Sun, 22 Apr 2001 05:01:04 +0000 |
| Subject: | Re: PROBLEM IN INSERTING TEXT WITH SINGLE QUOTE | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8777@lists.php.net to get a copy of this message | ||
> When a user fills out a form field that includes an apostrophe <ex. Jen's >,
> the verify screen shows it as <Jen\'s> and it
That's because magic_quotes_gpc is enabled in your php.ini file. You can
turn this off if you wish, or simply do a stripslashes() on the string
you are displaying.
> is then input into the database as <Jen\'s> - automatically adding
> the backslash.
No, here you are confused. Unless you are doing an addslashes() yourself,
it will go into MySQL correctly.
-Rasmus