Hey.. So I am trying to write some code that changes the password for employees...Not sure why it isnt working, I am not getting a query error. just when I try to log in after changing, it says i have the wrong user/pass
here is my code for this bit if you need to see more let me know:
if(($_POST['newPass'] == $_POST['newPass2'])&&($_POST['newPass'] != "")){
$user = $_POST['username'];
$oldPass = md5($_POST['password']);
$newPass = md5($_POST['newPass']);
$query = "UPDATE `pdem_users`.`tblUsers` SET `password` = '$newPass' WHERE username = '$user' AND password = '$oldPass' LIMIT 1";
mysql_query($query)or die("query 8 error");
}
thanks!