Re: DataObjects setFrom and DB:quote woes
| From: | Norbert Mocsnik | Date: | Mon, 05 Apr 2004 12:47:44 +0000 |
| Subject: | Re: DataObjects setFrom and DB:quote woes | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11623@lists.php.net to get a copy of this message | ||
Hello Aidan,
You've probably meant
if (get_magic_quotes_gpc()) {
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
}
Thanks, I've replaced the code in my webapps.
Regards,
Norbert
Aidan Lister wrote:
Not the fastest code ever, I suggest:
if (get_magic_quotes_gpc()) {
array_map($_GET, 'stripslashes');
array_map($_POST, 'stripslashes');
array_map($_COOKIE, 'stripslashes');
}