如果设置 $_POST
我在一个页面上有一个表单,该表单提交到另一个页面。在那里,它检查输入是否已填充。如果是这样,那就做点什么,如果它没有被填满,做点别的事情。我不明白为什么它总是说它已经设置,即使我发送了一个空的表单。缺少或错误是什么?mail
step2.php:
<form name="new user" method="post" action="step2_check.php"> 
    <input type="text" name="mail"/> <br />
    <input type="password" name="password"/><br />
    <input type="submit"  value="continue"/>
</form>
step2_check.php:
if (isset($_POST["mail"])) {
    echo "Yes, mail is set";    
} else {    
    echo "N0, mail is not set";
}