Ok... I am writing a login page using sessions. I go tit to work, but I am having trouble getting it set up so the user can change his password. I keep getting an error when I submit the data.
I have otherwise gotten this to work correctly, I just have an error in either $newpass or $sql. Any help would be appreciated.
...
// Error must be in either $newpass or $sql
$newpass = substr(md5($newpw),0);
$sql = "UPDATE member SET
password = PASSWORD('$newpass'),
WHERE username = '$newid'";
if (!mysql_query($sql)) // I do receive this error
{
error("A database error occurred in processing your ".
"submission.\nIf this error persists, please ".
"contact webmaster@texasdeltachi.org.");
}
...
Thanks in advance...