我不知道在这里做什么。PHP post请求(request.php)只是在单击按钮(correct.html)后继续下一页,即使我没有在输入中键入任何内容。我希望它验证密码是否正确,如果是这样=继续更正.html,否则提醒用户。
PHP 代码:
<?php
$pass = $_POST['password'];
if ($pass == "password")
{
include "correct.html";
}
else
{
echo "Password incorrect";
}
?>
代码:
<div class="input-container">
<input class="input-field" type="password" placeholder="Your passphrase" /><br>
<i class="fa fa-user icon"></i>
</div><br>
<div id=continue>
<form action="request.php" method="post">
<button class="button" name="password" value="password" style="vertical-align:middle"><span>Confirm</span></button>
</form>
</div>
潇湘沐
小怪兽爱吃肉
慕尼黑的夜晚无繁华