This section describes what is a cookie - a piece of information sent by a Web server to a browser. The server expects the browser to send all cookies back to the server.
What Is a Cookie? A cookie is a piece of information sent by a Web server to
a Web browser, saved by the browser, and sent back to the server later.
Cookies are transmitted inside the HTTP header.
Cookies move from server to browser and back to server as shown in the following diagram:
Web Web Local Web Web
Server Browser System Browser Server
Send Receive Save Send back Receive
cookies --> cookies --> cookies --> cookies --> cookies
As you can see from the diagram, cookies are actually saved by the local system
in memory or on the hard disk of Web browser user's machines.
Many users are concerned about this. But I think it is pretty safe to allow your browser to save cookies.
If you are really concerned, you can change your browser's settings to reject
cookies. But this may cause many Web based applications fail to run on your
browser.
Cookies are mainly used to pass information from one PHP script to the next script.