note 63806 deleted from function.addslashes by philip

From: Date: Fri, 31 Mar 2006 15:27:21 +0000
Subject: note 63806 deleted from function.addslashes by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107080@lists.php.net to get a copy of this message
Note Submitter: VBAssassin (Scott Thompson) ---- in response to: ==================================== This code can be inserted somewhere in your application (near the start): if (get_magic_quotes_gpc()) { // Yes? Strip the added slashes $_REQUEST = array_map('stripslashes', $_REQUEST); $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); } ==================================== That code will fail if someone sets a control to an array for example: <input type='checkbox' name='id_numbers[]' /> Just thought i'd let ya know...

« previous php.notes (#107080) next »