Global addslashes isn't working [FIXED]
Posted: Thu Jun 16, 2005 4:02 pm
Why isn't this working?
Code: Select all
if(!get_magic_quotes_gpc()) {
if(is_array($_POST)) {
while(list($key, $value) = each($_POST)) {
if(is_array($_POST[$key])) {
$_POST[$key] = addslashes($value);
}
@reset($_POST);
}
}
if(is_array($_GET)) {
while(list($key, $value) = each($_GET)) {
if(is_array($_GET[$key])) {
$_GET[$key] = addslashes($value);
}
@reset($_GET);
}
}
if(is_array($_COOKIE)) {
while(list($key, $value) = each($_COOKIE)) {
if(is_array($_COOKIE[$key])) {
$_COOKIE[$key] = addslashes($value);
}
@reset($_COOKIE);
}
}
}