<?php /* If you won't use filter_var() you should use this instead */ function isEmail($email) { if(preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) { return true; } else { return false; } } ?>