xariton
06-23-2005, 07:37 AM
Useful code to make magic_quotes=on and global=on when in php.ini magic_quotes=off and global=off
function stripslashes_deep($value)
{
return (is_array($value) ? array_map('stripslashes_deep', $value) : addslashes($value));
}
if (!get_magic_quotes_gpc())
{
$_GET = array_map('stripslashes_deep', $_GET);
$_POST = array_map('stripslashes_deep', $_POST);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
@import_request_variables("GPC");
extract($_SERVER);
extract($_POST);
extract($_COOKIE);
extract($_GET);
Just post it the beginning of your script
function stripslashes_deep($value)
{
return (is_array($value) ? array_map('stripslashes_deep', $value) : addslashes($value));
}
if (!get_magic_quotes_gpc())
{
$_GET = array_map('stripslashes_deep', $_GET);
$_POST = array_map('stripslashes_deep', $_POST);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
@import_request_variables("GPC");
extract($_SERVER);
extract($_POST);
extract($_COOKIE);
extract($_GET);
Just post it the beginning of your script