@ dot dot dot dot dot alexander at gmail dot com
I suggest replacing foreach by "stripslashes_deep":
Example #2 Using stripslashes() on an array on
<http://www.php.net/manual/en/function.stripslashes.php>:
<?php
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
?>
This gives:
<?php
if((function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) || (ini_get('magic_quotes_sybase') && (strtolower(ini_get('magic_quotes_sybase'))!="off")) ){
stripslashes_deep($_GET);
stripslashes_deep($_POST);
stripslashes_deep($_COOKIE);
}
?>