加一个判断防止再次刷新ifisset$_POSTpassword $password = $_POSTpassword; if$password == 19 密码正确跳转到主页 headerLocation indexphp; exit; else 密码错误弹出提示 echo scriptalert
加一个判断防止再次刷新和防止XSS攻击
if(isset($_POST['password'])) { $password = htmlspecialchars($_POST['password']); // 防止XSS攻击 if($password == '19') { // 密码正确,跳转到主页 header('Location: ind