note 40584 added to function.mysql-real-escape-string
| From: | ashraf at ametry dot com | Date: | Mon, 08 Mar 2004 20:37:34 +0000 |
| Subject: | note 40584 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66456@lists.php.net to get a copy of this message | ||
If you are submitting directly from a form or reading from a cookie then its usually easier (if you
are the admin of your server) to set make php do it for you by configuring
magic_quotes_gpc.
http://us3.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
or you can do something a bit smarter like ;
function cleanField($field){
if(get_magic_quotes_gpc()==0){
$field=mysql_real_escape_string($field);
}
return $field;
}
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40584
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40584&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40584&report=yes
Search -- http://master.php.net/manage/user-notes.php