15.1. Managing Sessions with Cookies
15.1.1. Cookie Fundamentals
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 ...