August 2003
Intermediate to advanced
1104 pages
19h 27m
English
If you build a Web application, it's likely you will have information to associate with each user. You may wish to remember the user's name from page to page. You may be collecting information on successive forms. You could attempt to pass the growing body of information from page to page inside hidden form fields, but this is impractical. An elegant solution is to use the idea of a session. Each visitor is assigned a unique identifier with which you reference stored information, perhaps in a file or in a database.
In the past, PHP developers were required to create their own code for handling sessions, but Sascha Schumann and Andrei Zmievski added new functions for session handling to PHP 4. The original system involved registering ...