23.2. Tracking Visitors with Session Identifiers

As Web sites evolve into Web applications, the problem of maintaining state arises. The issue is that, from page to page, the application needs to remember who is visiting the page. The Web is stateless. Your browser makes a connection to a server, requests one or more files, and then closes the connection. Five minutes later, when you click to a connecting page, the routine happens all over again. While a log is kept, the server doesn't remember you. Any information you gave it about yourself three pages back may be saved somewhere, but it's not associated with you after that.

Imagine a wizardlike interface for ordering a pizza. The first screen asks you how many pizzas you want. Then you go through ...

Get Core PHP Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.