note 35199 deleted from function.get-magic-quotes-gpc by aidan
| From: | aidan@php.net | Date: | Tue, 06 Jul 2004 06:20:23 +0000 |
| Subject: | note 35199 deleted from function.get-magic-quotes-gpc by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72696@lists.php.net to get a copy of this message | ||
Note Submitter: ddenicola@proofpoint.com
----
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 :)