How to sanitze user input in PHP before mailing?

Sanitize the post variable with filter_var().

Example here. Like:

echo filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);   

Leave a Comment