Re: MySQL and apostrophes, interesting problem. 42082
| From: | Matt Schroebel | Date: | Sun, 10 Mar 2002 16:59:09 +0000 |
| Subject: | Re: MySQL and apostrophes, interesting problem. 42082 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87910@lists.php.net to get a copy of this message | ||
Read the manual about magic_quotes_gpc and addslashes()
I prefer to add slashes myself, that way I can verify input lengths but it
has the risk that I might miss a field. The trouble with magic_quotes_gpc is
that if you have to re-display a variable you have to stripslashes() first.
----- Original Message -----
From: "Nick Patsaros" <npatsaros@yahoo.com>
Subject: [PHP] MySQL and apostrophes, interesting problem. 42082
> I'm working with a simple form which submits field
> data to a MySQL database. This is for the purpose of
> generating a dynamic news page for my site.
> Interestingly enough I've found that any time I try to
> submit data that contains an apostrophe "'" it gives
> me an error and will not send the data (any of it) to
> the database.