Wrighting to $_POST array

From: Date: Mon, 12 Oct 2009 15:51:24 +0000
Subject: Wrighting to $_POST array
Groups: php.general 
Request: Send a blank email to php-general+get-298859@lists.php.net to get a copy of this message
I have some code which will loop over the whole $_POST array, runs it through mysql_real_escape_string and then writes it all back to the array again, which seams to work. Are there any incompatibility problems or such like with writing into the $_POST or $_GET array? function clean_post() { $npost = array(); while ($value = current($_POST)) { $key = key($_POST); $npost += array("$key" => mysql_real_escape_string($value)); next($_POST); } $_POST = $npost; }

« previous php.general (#298859) next »