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;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php