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

From: Date: Wed, 18 Dec 2002 13:49:15 +0000
Subject: note 27773 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-41060@lists.php.net to get a copy of this message
Rather than trying to fix up the post and get variable arrays, I prefer to wrap all my form access methods in functions: function getval ($key) { global $HTTP_GET_VARS; if ((get_magic_quotes_gpc()) { return stripslashes($HTTP_GET_VARS[$key]); } return $HTTP_GET_VARS[$key]; } This has the added benefit of requiring a change in only one place if (when?) the PHP team decides to change yet again the method for accessing form variables. :-) -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php http://master.php.net/manage/user-notes.php?action=edit+27773 http://master.php.net/manage/user-notes.php?action=delete+27773 http://master.php.net/manage/user-notes.php?action=reject+27773

« previous php.notes (#41060) next »