Skip to Content
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition
book

PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition

by Larry Ullman
September 2011
Intermediate to advanced
696 pages
21h 29m
English
Peachpit Press
Content preview from PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth Edition

12. Cookies and Sessions

In This Chapter

Making a Login Page 368

Making the Login Functions 371

Using Cookies 376

Using Sessions 388

Improving Session Security 396

Review and Pursue 400

The Hypertext Transfer Protocol (HTTP) is a stateless technology, meaning that each individual HTML page is an unrelated entity. HTTP has no method for tracking users or retaining variables as a person traverses a site. Without the server being able to track a user, there can be no shopping carts or custom Web-site personalization. Using a server-side technology like PHP, you can overcome the statelessness of the Web. The two best PHP tools for this purpose are cookies and sessions.

The key difference between cookies and sessions is that cookies store data in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition

Larry Ullman

Publisher Resources

ISBN: 9780132767576Purchase book