我的网站有一个登录和注册页面。但是我在注册部分遇到错误。
我检查了我是否在某处输入错误,但我找不到任何错误。
else if ($_GET['signup'] == "success") {
echo '<p class="signuperror">Singup succesfull!</p>';
}
错误:
注意:未定义索引:在 C:\xampp\htdocs\php\signup.php 第 33 行注册
这是我设置注册的地方。
else {
$hashedPwd = password_hash($password, PASSWORD_DEFAULT);
mysqli_stmt_bind_param($stmt, "sss", $username, $email, $hashedPwd);
mysqli_stmt_execute($stmt);
header("Location: ../signup.php?signup=success");
exit();
}
您不能发送Location:
带有相对路径的标头。尝试改变
header("Location: ../signup.php?signup=success");
到您的完全限定域:
header("Location: http://your-domain.example.com/signup.php?signup=success");
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句