when someone clicks that email link its send to a page that checks its valid. if its valid it also updates the registered feild in the database to 1
When i login im trying to only alow a user to login if registered
the code im adding to my login function is, can anyone see where im going wrong?
Code: Select all
$query = mysql_query("SELECT registered FROM members WHERE username = '". $username ."'");
$result= mysql_query ($query)
if ($result == 0)
{
// Reshow the form with an error
$usernamereg_error = 'username is not registered';
include 'index.php';
exit;
}