A Code Demonstration for PHP

Team Monkey

State Information

State information can be stored in at least four ways:

  1. In hidden form fields.
  2. In the query string.
  3. In cookies.
  4. In sessions.

The number of visitors to this site is recorded in a database. In order to avoid incrementing the visitor counter every time someone refreshes the page, we put a cookie on your computer that indicates that you are no longer a truly new visitor. So the number of visitors, which is displayed in the footer of this page, depends on State Information that is stored on your computer in the form of a cookie.

You can fake the site into thinking you are a new visitor by deleting the cookie from your browser.

Or, you could just click on this link to clear the cookie and refresh this page.