note 103630 deleted from security.magicquotes by philip

From: Date: Fri, 02 Mar 2012 00:56:30 +0000
Subject: note 103630 deleted from security.magicquotes by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-186458@lists.php.net to get a copy of this message
Note Submitter: NanoCaiordo ---- Magic Quotes are depreciated and going to be removed in PHP6. If you still want your code to be portable, no warnings etc, as of PHP52 you can use the following code. <?php foreach ($_GET as $key => &$val) $val = filter_input(INPUT_GET, $key); foreach ($_POST as $key => &$val) $val = filter_input(INPUT_POST, $key); ?> The above will retrieve an-escaped GETs and POSTs regardless system settings. It can also be used for $_COOKIES and others.

« previous php.notes (#186458) next »