if ($_POST['email'] != $_POST['confirmemail']) { echo "The e-mail's you entered are not the same."; } else { echo "Your emails are the same :D"; }