May 2003
Intermediate to advanced
592 pages
14h 28m
English
One of the many very useful additions to PHP as of version 4 is built-in session support. The premise of a session is that data is stored on the server, not in the Web browser, and a session identifier is used to locate a particular user’s record (session data).
Previous to PHP 4, to create sessions, a programmer had to write an entire library of code that created a unique session ID, stored information in a database or text file, sent and read a cookie, and retrieved the stored data. Even though the PHP Base Library (Figure 7.12) simplified this process some, PHP 4’s session support is a wonderful addition.