I don't understand this code empty my HTTP_POST_VARS variable:
if ((get_magic_quotes_gpc() == 1)) {
switch ($REQUEST_METHOD) {
case "POST":
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$$key = stripslashes($val);
}
break;
case "GET":
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
$$key = stripslashes($val);
}
break;
}
}
This script is usefull to simulate get_magic_quotes_gpc to 0 but if I do it it empty my HTTP_POST_VARS and this code does not work:
while(list ($key, $val) = each($HTTP_POST_VARS)) {
echo "$key => $val<br>";
}
echo "Here we are...!!!..." ;
It displays, "Here we are...!!!..." but nothing at all for $key and for $val
How should I do to simulate get_magic_quotes_gpc to 0 without emptying HTTP_POST_VARS ?
Thanks, Vincent.
PS: If I delete the code ...(get_magic_quotes_gpc() == 1)...it works...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php