Re: php converts \ to \\, how can I stop that

From: Date: Fri, 03 May 2002 16:38:53 +0000
Subject: Re: php converts \ to \\, how can I stop that
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-95920@lists.php.net to get a copy of this message
You could also set these values in your php.ini: magic_quotes_gpc = off magic_quotes_runtime = off If you do this, then remember when inserting the data into a mysql database, it still needs to be escaped: $sql = sprintf(
    "insert into table (id, field) values ('', '%s')",
    mysql_escape_string($fieldvalue)
); Mike Mikael Syska wrote:
php-general@gremlins.com.hk (Jason Wong) wrote in news:php.general-95848 @news.php.net:
@news.php.net:
stripslashes()
thanks, now it works
Do read up on /why/ you need it.
ohhh, what do u mean???


« previous php.general (#95920) next »