确认用户帐户被删除不起作用


Confirm that the user account was deleted do not work

我有一个删除帐户页面,允许用户在检查密码是否正确后删除他们的帐户,但问题是当用户输入错误的密码时,系统提示密码不正确。当用户输入正确的密码时,系统不会显示任何消息来通知用户。有人能帮我吗?

<标题> delete_account.php h1> div class="answers">

您正在将$msgToUser always设置为关于密码不正确的消息。

即使删除帐户也会运行。

你可能想把它放在Else子句中

} else {
    $msgToUser = "<h3 style='color:#CC0000'>YOU must Write the correct Password</h3>";
}

顺便说一句,你需要仔细阅读安全性,你的代码很容易受到SQL注入的攻击。