|
Posted by Rik on 03/15/07 08:55
Nosferatum <John.Olav.O@gmail.com> wrote:
> Oh, I get your point. Thanks for stopping me from doing something
> really stupid... :-) (*blush*)
> I have to learn how to use sessions.
>
> By the way: Is it advicable to add a session unregister event upon
> page leave, or timeout?
Well, session_unregister() doesn't have to be used anymore.
If you're users can be bothered to click a logout button, by all means
destory the session immediately on that logout page. Most of your users
won't bother, so set the timeout on sessions to something that suits you
so they will be trashed by the garbage collector. Keep in mind that simply
having a started session doesn't mean it's valid, keep track of valid
sessions by either a $_SESSION variable or possibly a file/database/etc.
--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel
[Back to original message]
|