Jump to content
Larry Ullman's Book Forums

margaux

Members
  • Posts

    453
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by margaux

  1. I can't get the login script to work properly. When the account has been activated and the user then tries to login, the error message "The email address and password do not match those on your account or you have not activated your account." I removed the code 'AND active IS NULL' and I was able to get the script working properly. In the d/b, the active field is blank. Here's the relevant code from the login.php file: $q = "SELECT user_id, firstName, user_level FROM users WHERE (email='$e' AND pass=SHA1('$p')) AND active IS NULL"; and the code from the activate.php file: $q = "UPDATE users SET active=NULL WHERE (email='" . mysqli_real_escape_string($dbc, $em) . "' AND active='" . mysqli_real_escape_string($dbc, $ac) . "') LIMIT 1"; Any suggestions where I am going wrong? Thanks
×
×
  • Create New...