Re: Why $_REQUEST do the same thing as mysql_escape_string()

From: Date: Wed, 17 Oct 2007 14:32:15 +0000
Subject: Re: Why $_REQUEST do the same thing as mysql_escape_string()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-263268@lists.php.net to get a copy of this message
On 10/17/07, truncatei@gmail.com <truncatei@gmail.com> wrote: > I put some thing in an form input filed like this: > ' " \ > then submit to a php script. > When use $_GET / $_POST / $_REQUEST to get the value, > I always get: > \' \" \\ > In php expression it should be: > $_REQUEST['field'] = "\\' \\\" \\\\"; > > Any one who can tell me why? > magic_quotes_gpc Also it doesn't necessarily do the same thing. mysql_real_escape_string() takes into consideration character sets.

« previous php.general (#263268) next »