i designed the
members system
and it works
great.
the only
problem i am
having is that
it won't log me
out.
this is what my
log out code
looks like
which is the
same as the
tutorial.
when i click
logout.php, it
takes me back
to the main
page but when i
press back or
type in the
members page
url, I'm right
back in. The
session never
got erased... I
echoed out on
my main page to
see after the
logout and the
redirect to the
main page and
it shows that
its still
logged_in = 1
and etc.
Is there
something wrong
with my logout
code?
Code:
<?
$_SESSION['logg
ed_in'] = 0;
setcookie('logi
n_cookie',
"",
time() - 60,
'/',
'.sitename.com'
);
session_destroy
();
header("Lo
cation:
http://www.site
name.com"
?>
|