Forum Moderators: coopster

Message Too Old, No Replies

Question with Session

How can you reset?

         

Francis

5:33 am on Jan 19, 2004 (gmt 0)

10+ Year Member



I am currently working on a site and experimenting with Sessions. I'm following a tutorial from a book and so far I am doing OK. The problem is I can't seem to reset the Session ID ispite of using session destroy. However, if I close the browser and go back to the site, I am issued a new session ID. Does this mean that I have to close all opened browsers before a new session ID will be issued? Or is this another way of doing this? Thanks.

Next is, can you point me to a resource on the web (preferably here on Webmaster World) where I can find topics on how to make sure that no two same user can use a particular file/directory on the site. This means that one person logs in on a different PC using the same username and password, then another one would use the same set of username and password.

Thanks again for the help.

coopster

1:35 pm on Jan 20, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie.

Although book tutorials are good, they don't often cover the configuration variables and intracacies of PHP Session handling [php.net].

How can I tell if the same userid is logged in at the same time from two different places? HTTP is a stateless protocol which means a connection is made, information is sent, and the connection is...well, disconnected. There is no way to check current active connections except through some sort of server-side management mechanism.