note 19807 deleted from function.get-magic-quotes-gpc by didou
| From: | didou@php.net | Date: | Thu, 29 May 2003 21:12:17 +0000 |
| Subject: | note 19807 deleted from function.get-magic-quotes-gpc by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49320@lists.php.net to get a copy of this message | ||
Note Submitter:
----
And in addition to my own code (found an error in the eval), here's the final working code:
if (get_magic_quotes_gpc())
{
foreach($HTTP_GET_VARS as $k=>$v)
{
$HTTP_GET_VARS[$k] = stripslashes($v);
eval( "\$$k = \"$HTTP_GET_VARS[$k]\";" );
}
foreach($HTTP_POST_VARS as $k=>$v)
{
$HTTP_POST_VARS[$k] = stripslashes($v);
eval( "\$$k = \"$HTTP_POST_VARS[$k]\";" );
}
foreach($HTTP_COOKIE_VARS as $k=>$v)
{
$HTTP_COOKIE_VARS[$k] = stripslashes($v);
eval( "\$$k = \"$HTTP_COOKIE_VARS[$k]\";" );
}
}