Everything in my new website is working just fine, except that I can't get this piece of code to work:
$query = mysql_query("SELECT * FROM members WHERE useremail = '$useremail'");
$row = mysql_fetch_assoc($query);
$activation = $row['activation'];
if ($activation == '0') {
die('Your account is not yet active. Please check your email!');
exit();
}
In the database, the type is enum('0', '1')
and the field name is activation
.
Here is the error message I am getting:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
Could someone please give me a hint?
Thank you.