June 2002
Intermediate to advanced
800 pages
16h 3m
English
One way to identify users and to store data is to use cookies. For a long time cookies were the only solution for storing session data permanently, and they are still widely used today.
HTTP is not a connection-oriented protocol, so cookies can be used to fake some sort of permanent interaction with the server. The idea of a cookie is to store information directly on the client. Whenever a site is called, the information in the appropriate cookie is sent to the server automatically. Keep in mind that the server does not look for the cookie—the information is sent to the server by the browser automatically. Let's look at a simple example:
<?php setcookie ("YourName", "Hans-Jürgen ...Read now
Unlock full access