note 35199 added to function.get-magic-quotes-gpc

From: Date: Sat, 23 Aug 2003 00:27:21 +0000
Subject: note 35199 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-54925@lists.php.net to get a copy of this message
A much simpler way, it seems, to fight magic quotes in the $_GET vars (or any such single-dimensional array) is this code: // Fix any escaping of quotes that may have been done by PHP's magic_quotes_gpc variable. if(get_magic_quotes_gpc()) { $_GET = array_map("stripslashes", $_POST); } array_map exists for a reason :) ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35199 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35199&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35199&report=yes

« previous php.notes (#54925) next »