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);

Leave a Reply

Close Menu
%d bloggers like this: