I have a header system on my forums that has an upload area that ONLY staff (mods and admins) can get too and upload new headers for the forums home page.
http://www.scifi-meshes.com/forums
Now.. prior to my update to PHP 4.3.10 (on saturday) this header system was working fine. However after that update (which I assume is part of the problem) I've discovered that I can no longer log into my header management page (self created).
The code for checking the password is as follows:
Code:
/* password correct? */
$query = "SELECT salt, password FROM user WHERE username='$username'";
$result = mysql_query($query) or die("The information you entered does not match our records.");
$row=mysql_fetch_array($result);
$dbpassword = $row['password'];
$salt = $row['salt'];
if ($dbpassword == md5(md5($password). $salt)) {
print "Password correct<br><br>";
}
else {
die("password not correct!");
}
This compares what the user entered with that is stored in the Vbulletin forums MySQL database. However, I am ALWAYS getting "Password not correct!" and I have changed my password a few times to see if something wasn't set properly.
Can anyone help me? This code WAS working perfectly.