note 38154 deleted from function.addslashes by didou

From: Date: Wed, 10 Dec 2003 08:21:52 +0000
Subject: note 38154 deleted from function.addslashes by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-61730@lists.php.net to get a copy of this message
Note Submitter: matthew.eastman@hotpop.com ---- Here's a really simple way to make sure that magic quotes are always used for your program regardless of the php.ini setting: function safe_quotes(&$given) { if (is_array($given)) array_walk($given, 'safe_quotes'); else $given = addslashes($given); } if (!get_magic_quotes_gpc()) { $bigarray = array(&$_GET, &$_POST, &$_COOKIES); safe_quotes($bigarray); }

« previous php.notes (#61730) next »