Re: Sanitizing potential MySQL strings with no database connection
| From: | Dotan Cohen | Date: | Tue, 20 Oct 2009 18:08:30 +0000 |
| Subject: | Re: Sanitizing potential MySQL strings with no database connection | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299114@lists.php.net to get a copy of this message | ||
2009/10/20 Andrea Giammarchi <an_red@hotmail.com>:
> even better
>
> $error_reporting = error_reporting(0);
> if(mysql_real_escape_string($variable) === false)
> {
> error_reporting($error_reporting);
>
> // create a default DB connection
>
> } else
> error_reporting($error_reporting);
> unset($error_reporting);
>
Thanks, I will try that this evening. I may not have permissions for
that, but we'll see.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il