I want to make a little contact form, where the user inputs his name, email, and the message. The form is submitted with ajax to a php file that has to do the following:
1- check if the 3 posted variables exist and not NULL 2- sanitize and verify the 3 variables for malicious code and some criteria, like the name must be and the email must be.. 3- send the data with php's mail().
how can I achieve the first and the second steps with php filter
NB: I took a look at the php's manual and I understood nothing.
Thanks.
mail()anything directly to it – that's an easy way to get into spam blacklists.