现在我正在开发一个允许在线注册的应用程序。对于开发,密码检查只检查一个MySQL行,以确保该值与输入字段中的值匹配。试图围绕PHP密码围绕盐/加密
此代码检查,看看该行存在:
$res = mysql_query("SELECT * FROM `users` WHERE `username` = '".$username."' AND `password` = '".$password."'");
$num = mysql_num_rows($res);
//check if there was not a match
if($num == 0){
//if not display error message
echo "<center>The <b>Password</b> you supplied does not match the one for that username!</center>";
我感到困惑实施盐业体制改革。我将如何改变这个脚本来检查加密的密码?我还没有找到一个很好的教程,详细解释了这一点。
谢谢,这很有道理。 – user978905