PHP and mysqli. How to apply a filter without directly accessing the super global $ _POST

0

How to apply a filter without directly accessing the super global $ _POST. changing this:

$F['email']  = mysqli_real_escape_string($conn,$_POST['email']);

So:

$email = filter_input_array(FILTER_INPUT,'email',FILTER_SANITIZE_EMAIL);  
$F['email']  = mysqli_real_escape_string($conn,$email);

But it does not work, what is the right syntax if it exists?

    
asked by anonymous 07.09.2017 / 04:58

1 answer

0

That's also true:

$email = filter_input(INPUT_POST,'email',FILTER_SANITIZE_EMAIL); 
    
07.09.2017 / 14:21