note 56594 deleted from function.stripslashes by betz
| From: | betz@php.net | Date: | Thu, 08 Sep 2005 13:20:20 +0000 |
| Subject: | note 56594 deleted from function.stripslashes by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94915@lists.php.net to get a copy of this message | ||
Note Submitter: henrivanwerkhoven at gmail dot com
----
Reply to: spam at evolution515 dot net
12-Aug-2005 01:13
Yes there is something you can do about this:
<?php
if (get_magic_quotes_gpc()) {
function array_stripslashes($array){
foreach(array_keys($array) as $k){
if(is_array($array[$k])){
$array[$k] = array_stripslashes($array[$k]);
}
else{
$array[$k] = stripslashes($array[$k]);
}
}
return $array;
}
$_POST = array_stripslashes($_POST);
// and whatever more you want to strip slashes to
}
?>