Wrighting to $_POST array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux