I'm checking all input in php in both POST and GET and i'm turning them into html entities before anything else in my application.
problem is though, when i have multiple inputs of the same name (eg. multiple checkboxes ). my input checker nulls the array.
i want to check the POST and GET arrays and i want to check all the multiple inputs of the same name (ie. arrays ) within them.
can anyone suggest a piece of code to me ?
// Input validation
$_GET = array_map("input_check",$_GET);
$_POST = array_map("input_check",$_POST);
// Check input strings
function input_check($arr)
{
return htmlentities($arr,ENT_QUOTES,'UTF-8');
}
array_map()