note 84371 rejected from function.get-magic-quotes-gpc by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 Jul 2008 16:12:47 +0000 |
| Subject: | note 84371 rejected from function.get-magic-quotes-gpc by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-141376@lists.php.net to get a copy of this message | ||
Note Submitter: christophe at immaginaredesign dot com dot br
----
function anti_sql_injection($string)
{
$string = get_magic_quotes_gpc() ? stripslashes($string) : $string;
$string = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($string) : mysql_escape_string($string);
return $string;
}
I need to understand this function, to apply in a data base... And execute it between the creation
of a query and the execution of the same query... I'm waiting for an answer...
Thanks folks!