Re: [PHP] still on sessions

2002-07-26 Thread Martin Clifford

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.



Something along those lines.



>>> "Tyler Durdin" <[EMAIL PROTECTED]> 07/26/02 03:28PM >>>
alrigh I have switched everything over to the $_Session['variable'] style of 
session. Next question, I have a little script that used to check if the 
session was registered and if it was not it would redirect to the login 
page. How do i accomplish this now that i cannot check if the session is 
registered? Here is what i have.

http://loginpage.com";);
  }
?>

How do I check if a session is active/registered or whatever it is so i cn 
still redirect or assign variables?



_
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] still on sessions

2002-07-26 Thread John Holmes

> 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 you assign to it will be available
on any page you call session_start(). How much easier can it be??

If you really want a message, then on the last line of your file put 

echo "Session Closed";

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] still on sessions

2002-07-26 Thread Tyler Durdin

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 device: http://mobile.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php