PHP Scripts for Cookie and Session Management

HTTP Cookie, otherwise also known as browser cookie or cookie, is a small text file stored in the browser of a user's computer. The cookie is sent by the web server to the browser when a user is connecting to it and set in the browser such as Firefox or Internet Explorer. The cookie is used to store information such as user preferences, php session information etc and used by the web server everytime the browser connects to the web server. For example: a user might add few items to the shopping cart but leave the website without checking out. A cookie could then be set on the user's browser with the shopping cart content and next time when the user connects to the website, the cookie stored on his system is retrieved and shopping cart is populated with his previously added items.

PHP Session Management - A cookie can be used to store the session information of a user in his browser but not recommended as the cookie could be manipulated in the browser.

Possibly Related PHP scripts: