note 20239 added to function.set-magic-quotes-runtime
| From: | tjerkos at stack dot nl | Date: | Wed, 27 Mar 2002 10:01:33 +0000 |
| Subject: | note 20239 added to function.set-magic-quotes-runtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28269@lists.php.net to get a copy of this message | ||
This approach works quite good for me:
function stripit(&$a)
{
if (is_array($a))
{
foreach ($a as $fname => $fval)
{
if (is_array($fval))
stripit($a[$fname],$tmp[$fname]);
else
$a[$fname]=stripslashes($fval);
}
}
}
if (get_magic_quotes_gpc())
{
stripit($HTTP_GET_VARS);
stripit($HTTP_POST_VARS);
stripit($HTTP_COOKIE_VARS);
}
--
http://www.php.net/manual/en/function.set-magic-quotes-runtime.php
http://master.php.net/manage/user-notes.php?action=edit+20239
http://master.php.net/manage/user-notes.php?action=delete+20239
http://master.php.net/manage/user-notes.php?action=reject+20239