filter_has_var vs isset
I am using the following to sanitize input prior to validating:
if(filter_has_var(INPUT_POST, "$var")) {
$sanitized = filter_input(INPUT_POST, '$var', FILTER_SANITIZE_STRING);
$_POST['$var'] = trim($sanitized);
Is it preferable to use filter_has_var() to check the input or isset()? Is there a difference and what is it?
Thank you in advance for any help.
