Skip to Main Content
PHP and MySQL™ Phrasebook
book

PHP and MySQL™ Phrasebook

by Christian Wenz
October 2012
Intermediate to advanced content levelIntermediate to advanced
360 pages
4h 57m
English
Addison-Wesley Professional
Content preview from PHP and MySQL™ Phrasebook

6. Remembering Users (Cookies and Sessions)

Hypertext Transfer Protocol (HTTP) is a stateless protocol. Put simply, a client (Web browser) connects to a Web server, sends a request, and gets a response. Then, the connection is closed. The consequence is the next time the same client sends a request to the same Web server, it is a new request, so the Web server cannot identify the caller. This is, of course, a problem for applications in which state must be maintained (for instance, e-commerce applications with a shopping-cart functionality).

However, you can overcome this limitation in several ways. The basic idea is to send some information with the HTTP response; to try to achieve that, this information is sent back with all subsequent requests ...

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 7 Programming Blueprints

PHP 7 Programming Blueprints

Jose Palala, Martin Helmich

Publisher Resources

ISBN: 9780133040340Purchase book