What am I doing wrong?
[php]$expected = array(‘date’ => array(“filter” => FILTER_SANITIZE_STRING), ‘time’ => array(“filter” => FILTER_SANITIZE_STRING), ‘people’ => array(“filter” => FILTER_SANITIZE_NUMBER_INT, “options” => array(“min_range” => 1, “max-range” => 100)), ‘name’ => array(“filter” => FILTER_SANITIZE_STRING), ‘phone’ => array(“filter” => FILTER_SANITIZE_NUMBER_INT));
foreach($expected AS $key){
if(!isset($_POST[$key])){
die(false);
}elseif (empty ($_POST[$key])) {
die(false);
}
}
$result = filter_input_array(INPUT_POST, $expected );
foreach ($result AS $key){
if(!$result[$key]){
die(false);
}
}[/php]
Thank you very much.