if (empty($_POST['email1'])) { $p=FALSE; $message .= '

You forgot to enter your email address!

'; } else { if ($_POST['email1'] == $_POST['email2']) { $p = $_POST['email1']; } else { $p = FALSE; $message .= '

Your email did not match the confirmation email address!

'; } } $email = $p; if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { $p = $_POST['email']; } else { $message .= '

Invalid email address.

'; }