note 24008 added to function.mysql-escape-string

From: Date: Sat, 03 Aug 2002 21:11:06 +0000
Subject: note 24008 added to function.mysql-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-34241@lists.php.net to get a copy of this message
If magic_quotes_gpc is set to "On" in php.ini and you use mysql_escape_string, you will have extra '\' inserted, for example after an apostrophy. In essance you are adding escapes twice. Example: mysql_escape_string("let's") equals "let\\\'s" when magic_quotes_gpc is on. mysql_escape_string("let's") equals "let\'s" when magic_quotes_gpc is off. -- http://www.php.net/manual/en/function.mysql-escape-string.php http://master.php.net/manage/user-notes.php?action=edit+24008 http://master.php.net/manage/user-notes.php?action=delete+24008 http://master.php.net/manage/user-notes.php?action=reject+24008

« previous php.notes (#34241) next »