So, I figured I would just implement a check into the login system preventing them from logging in if their account is deactivated, so I did this....
(Note: the database connection is already established)
$login = clean($_POST['login']);
$password = clean($_POST['password']);
$qry="SELECT active FROM members WHERE login='$login'";
$active=mysql_query($qry);
if($active == 1) {
header("location: deactivated.php");
exit();
}
I of course put that before the code that logs them in, yet deactivated accounts are still logging in...
On the flip side, if I change the if($active == 1) to if($active = 1) then all accounts get redirected to the deactivated page.
Can anyone help shed a little light on this? Am I missing something basic? Thank you.

New Topic/Question
Reply




MultiQuote




|