Alright this is my last question. I have closed the session, but can i make
sure it is closed? i want to use something like if the session is closed
then print a message session closed.
_
Send and receive Hotmail on your mobile
Alright this is my last question. I have closed the session, but can i
make
sure it is closed? i want to use something like if the session is
closed
then print a message session closed.
You don't have to close it; it's automatic. Just treat $_SESSION like
the regular variable it is. Anything
I always just register an extra variable to track logged in users. If the user has
logged in, it is set to TRUE, if not, FALSE. Then I just do comparisons on that
variable.
?php
session_start()
if($loggedin == FALSE) {
header(Location: login.php);
}
?
Something along those lines.
3 matches
Mail list logo