Changes

Jump to: navigation, search

PHP and Cookies - Creating, Reading and Writing

222 bytes added, 14:52, 6 June 2007
no edit summary
Cookies essentially provide a mechanism to store small pieces of data on the computer systems of the visitors to your site. This enables you to maintain the state of a user's visit to your site so that you can track their movement through though the site, or to store information such as their user name and address after they have entered it on one page so that they don't have to keep re-entering it on different pages.
before going to far in implenting cookie son your web site it is important to keep in mindthat users can disable cookie support in browsers. You shoud, therefore, avoid making your site completely dependent on cookies. Another option for maintaing maintaining state is to use PHP Sessions (see [[Understanding PHP Sessions]] for more information). Cookies and sessions differ in important ways, and which to use depends on your requirements.
== The Difference Between Cookies and PHP Sessions ==

Navigation menu