How to sanitize GET and POST in PHP

There is actually a pretty simple solution for this one

$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
and
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);

You may also like...

Leave a Reply