0
How to apply a filter without directly accessing the super global $_POST. changing that:
$F['email'] = mysqli_real_escape_string($conn,$_POST['email']);
That’s why:
$email = filter_input_array(FILTER_INPUT,'email',FILTER_SANITIZE_EMAIL);
$F['email'] = mysqli_real_escape_string($conn,$email);
but it doesn’t work , which is the right syntax if it exists ??
You’ve tried it this way
$email = filter_input_array(INPUT_POST, ['email' => FILTER_SANITIZE_EMAIL]);
– gato
Why don’t you want to access the super global? And instead of filters, in my opinion it’s worth it if you create your own regular expression to detect emails and, if applicable, sanitize them.
– Clayderson Ferreira
yes regular expression I use ,but in this case it is to get data that comes from the form.com mysqli, this way I wrote I use with Pdo , but for mysqli does not work understand.
– Francisco