if(isset($_POST['email'])){ $email = $_POST['email']; if(filter_var($email, FILTER_VALIDATE_EMAIL)){ echo 'This is a valid email.'; }else{ echo 'This is an invalid email.'; } } ?> Email: 复制代码 PHP