Ryan A wrote:
Hey John,
Thanks for replying.

I cant use strip slashes because there are a number of scripts doing DB
things and searching for all of them and modifying things just for one
client can be a royal PITA.

I tried to use "php_flag magic_quotes_gpc off" in the *existing* .htaccess
file like so:

php_flag magic_quotes_gpc off


Try the above line alone.


If you are still getting 500 error you have to loop $_GET, $_POST ...., arrays and stripslash each element, unless the element is also an array, in this case you have to loop this one too:

function strip_slashes_array($var) {
        if(!is_array($var)) return stripslashes($array);
        foreach($var as $key => $value) {
                $var[$key] = strip_slashes_array($value);
        }
        return $var;
}

$_POST = strip_slashes_array($_POST);

HTH

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to