note 56594 added to function.stripslashes

From: Date: Thu, 08 Sep 2005 12:42:18 +0000
Subject: note 56594 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-94912@lists.php.net to get a copy of this message
Reply to: spam at evolution515 dot net 12-Aug-2005 01:13 Yes there is something you can do about this: <?php if (get_magic_quotes_gpc()) { function array_stripslashes($array){ foreach(array_keys($array) as $k){ if(is_array($array[$k])){ $array[$k] = array_stripslashes($array[$k]); } else{ $array[$k] = stripslashes($array[$k]); } } return $array; } $_POST = array_stripslashes($_POST); // and whatever more you want to strip slashes to } ?> ---- Manual Page -- http://www.php.net/manual/en/function.stripslashes.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56594 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56594&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56594&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94912) next »