The filter_input function accepts an options parameter. Each filter accepts different options. For example, the FILTER_VALIDATE_INT filter can accept default, min_range and max_range options as described here. $get_id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT, array("options" => array( "default" => 0, "min_range" => 0 ))); var_dump($get_id); // $get_id = 0 when id is...
FITER_VALIDATE_INT should be FILTER_VALIDATE_INT. You are missing L in FILTER in all instances of the constant. Turning on error reporting would have thrown several Notice: Use of undefined constant FITER_VALIDATE_INT - assumed 'FITER_VALIDATE_INT' errors.
Hmm... You could try another filter here - I would probably try FILTER_VALIDATE_REGEXP. Maybe something like: $mins = filter_input(INPUT_POST, 'hour', FILTER_VALIDATE_REGEXP, ['options' => [ 'regexp' => '/\d{1,2}/'] ]); Just adding the regex \d{1,2} as an example here, clearly you might want to define something better here. Alternatively you could use...
Try this: if ( !$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)) { exit(); } echo $email ...