O'Reilly logo

HTTP Developer’s Handbook by Chris Shiflett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sample Session Management Mechanism

In order to elaborate on the principles introduced in this chapter, this section introduces an example PHP script that implements some basic session-management features. This example borrows heavily from the example state management mechanism introduced in the previous chapter in order to demonstrate the characteristic that session management is an enhancement to state management.

Note

This example only makes use of a session data store and does not utilize a separate data store for persistent user data. The session data store used in this example is flexible enough to accommodate most situations, and the persistent data store for user records (such as where you might store a username and password) varies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required