note 25481 added to function.stripslashes

From: Date: Wed, 25 Sep 2002 14:57:52 +0000
Subject: note 25481 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-37230@lists.php.net to get a copy of this message
Nice function, But why do you scan for objects in $_GET, $_POST and $_COOKIES? You cann't post any object to a page! I use: set_magic_quotes_runtime(0); if (get_magic_quotes_gpc ()) { array_stripslashes($_POST); array_stripslashes($_GET); array_stripslashes($_COOKIES); } function array_stripslashes(&$array) { while (list($key) = each($array)) { if (is_array($array[$key])) { stripslashes_array($array[$key]); } else { $array[$key] = stripslashes($array[$key]); } } } -- http://www.php.net/manual/en/function.stripslashes.php http://master.php.net/manage/user-notes.php?action=edit+25481 http://master.php.net/manage/user-notes.php?action=delete+25481 http://master.php.net/manage/user-notes.php?action=reject+25481

« previous php.notes (#37230) next »