9 Cookies and Sessions

Chapter 8, “Creating Web Applications,” covers a number of techniques for developing more complete Web applications. One of the problems you’ll encounter as you begin to assemble a multipage Web site is that the Hypertext Transfer Protocol (HTTP) is a stateless technology. This means that you as a Web developer have no built-in method for tracking a user or remembering data from one page of an application to the next. This is a serious problem, because e-commerce applications, user registration and login systems, and other common online services rely on this functionality. Fortunately, maintaining state from one page to another is fairly simple using PHP.

This chapter discusses the two main methods for tracking data: ...

Get PHP for the Web: Visual QuickStart Guide, Third Edition now with O’Reilly online learning.

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