note 25481 deleted from function.stripslashes by aidan

From: Date: Sun, 29 Aug 2004 10:23:44 +0000
Subject: note 25481 deleted from function.stripslashes by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75537@lists.php.net to get a copy of this message
Note Submitter: alex at netflex dot nl ---- 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]); } } }

« previous php.notes (#75537) next »