header() not working in my login script
I have a login script that is working fine, and uses header() after they
have logged in successfully to redirect them to whatever page they came
from.
Now I have a problem where I want to check if their account is activated
before logging them in, and if they aren't activated, redirect them to the
account activation page.
if($user_row['activated'] == 0) {
header('Location: activate.php?ref=login');
}
This doesn't redirect them for some reason. Any other code that I put in
that if statement runs fine, but not the header(). It's not that I have
any output before this because my other redirects later on in the page
work fine.
No comments:
Post a Comment