blinkbob123
Technical User
Hi, I wish to use magic quotes but it has been disabled on my server. I'm not too great with arrays but tried putting:
code:------------------------------------------------------$global = @array(0 => $_GET, 1 => $_POST, 2 => $_ENV, 3=> $_COOKIE, 4=> $_SESSION, 5 => $_SERVER, 6 => $_FILES);
if(!get_magic_quotes_gpc()) {
foreach($global as $key => $val) {
$global[$key] = addslashes($val);
}
}
-----------------------------------------------------------
in a header file on my website. But it did not work. Is this the correct/secure way to do it and if so how do I fix it. Thanks
code:------------------------------------------------------$global = @array(0 => $_GET, 1 => $_POST, 2 => $_ENV, 3=> $_COOKIE, 4=> $_SESSION, 5 => $_SERVER, 6 => $_FILES);
if(!get_magic_quotes_gpc()) {
foreach($global as $key => $val) {
$global[$key] = addslashes($val);
}
}
-----------------------------------------------------------
in a header file on my website. But it did not work. Is this the correct/secure way to do it and if so how do I fix it. Thanks