if(filter_var($email,FILTER_VALIDATE_EMAIL) === false){ echo 'Email is not valid';}else{ //do the stuff}