Hi,
In PHP page, Code below always returns TRUE even no record is updated. How can i solve this problem?
Thanks
$q="UPDATE login SET password=SHA1('$newPassword') WHERE id='$loginID' AND password=SHA1('$oldPassword')";
$run=mysql_query($q);
if ($run===TRUE) { echo "SUCCESSFUL";
} else {
echo "ERROR: Old password is wrong. Please try again.";
}