![](/img/trans.png)
[英]how to compare (entered password) with (encrypted password in wordpress database) by php code
[英]How to compare the entered password with a sql database?
此代碼應將輸入的密碼與sql數據庫進行比較:
$result = $connection->query($sql);
if($result == false)
?><script>alert('Wrong password')</script><?php
while ($result != false) {
?><script>alert('Right password')</script><?php
}
$connection->close();
但這確實會檢查輸入的密碼。 但是如何檢查密碼?
測試是否設置了$_POST["username"]
和$_POST["password"]
,如果沒有設置,則不要執行任何在PHP中進行的檢查。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.