Is there any reason I wouldn't want to do this on every page on my script? It protects against SQL injections, plus other mishaps (Such as XSS).PHP Code:foreach ($HTTP_POST_VARS as $key=>$value) {
$value = filter_input(INPUT_POST, $key, FILTER_SANITIZE_SPECIAL_CHARS);
$_POST[$key] = $value;
}
foreach ($HTTP_GET_VARS as $key=>$value) {
$value = filter_input(INPUT_GET, $key, FILTER_SANITIZE_SPECIAL_CHARS);
$_GET[$key] = $value;
}




Reply With Quote