Re: Text boxes posted to MySQL record that contain quotes

From: Date: Wed, 09 Jul 2003 05:21:26 +0000
Subject: Re: Text boxes posted to MySQL record that contain quotes
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-154490@lists.php.net to get a copy of this message
"Vernon" <vernon@comp-wiz.com> wrote in message news:20030709033505.4679.qmail@pb1.pair.com... > OK when I use the mysql_escape_string() it adds the slashes so that the > message will have \"the message\" so I've tried using the stripslashes() as > such: > > $message = > stripslashes(mysql_escape_string($HTTP_POST_VARS['message'])); > > which then causes the orginal problem, so it seems that I keep trying to > reverse each other. > > I don't want the slashes and I need the quotes. Hi, this is from obscure memory, have a look at the function get_magic_quotes_gpc. I think that the input you are getting is already escaped. HTH G

« previous php.general (#154490) next »