note 103630 added to security.magicquotes

From: Date: Mon, 25 Apr 2011 03:22:19 +0000
Subject: note 103630 added to security.magicquotes
Groups: php.notes 
Request: Send a blank email to php-notes+get-179114@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 203.206.165.208 ---- Manual Page -- http://www.php.net/manual/en/security.magicquotes.php Edit -- https://master.php.net/note/edit/103630 Del: integrated -- https://master.php.net/note/delete/103630/integrated Del: useless -- https://master.php.net/note/delete/103630/useless Del: bad code -- https://master.php.net/note/delete/103630/bad+code Del: spam -- https://master.php.net/note/delete/103630/spam Del: non-english -- https://master.php.net/note/delete/103630/non-english Del: in docs -- https://master.php.net/note/delete/103630/in+docs Del: other reasons-- https://master.php.net/note/delete/103630 Reject -- https://master.php.net/note/reject/103630 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179114) next »