note 27784 added to function.get-magic-quotes-gpc
| From: | joscha at rack1 dot php dot net | Date: | Wed, 18 Dec 2002 17:47:53 +0000 |
| Subject: | note 27784 added to function.get-magic-quotes-gpc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41072@lists.php.net to get a copy of this message | ||
Use this function:
function my_magic_quotes($var)
{
foreach($var AS $key => $value) {
if (is_array($value)) {
$var[$key] = my_magic_quotes($value);
} else {
$var[$key] = addslashes($value);
}
return $var;
}
if (!get_magic_quotes_gpc()) {
$_GET = my_magic_quotes($_GET);
}
You can download the commented source here:
http://dev.feth.com/PHP/my_magic_quotes.phps
greets,
Joscha Feth
--
http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
http://master.php.net/manage/user-notes.php?action=edit+27784
http://master.php.net/manage/user-notes.php?action=delete+27784
http://master.php.net/manage/user-notes.php?action=reject+27784