Jump to content

Php Sessions


gameboyz
 Share

Recommended Posts

Hello,I believe that if I want some sort of user login and logout feature on my site I'll need to use PHP sessions right? But how exactly do they work? Like how long does the server stores those variables for, and how do the server identify the user (I think it uses cookies, but I'm not too sure).And are sessions complicated? CheersFabian

Link to comment
Share on other sites

The server sends a session ID in a cookie, and the browser sends the cookie back when making requests so the server knows which set of data to pull up for the user. By default it stores session data in temporary files. The session timeout is 24 minutes by default, the timeout gets reset whenever the user sends a request and you use session_start again. Check here for more info:http://w3schools.invisionzone.com/index.php?showtopic=12509

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...