Monday, June 11, 2012

PHP : Session And Cookie

PHP : Session And Cookie

difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not.
This difference determines what each is best used for. A cookie can keep information in the user's browser until deleted.
If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit.
You can store almost anything in a browser cookie. The trouble is that a user can block cookies or delete them at any time.
If, for example, your website's shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your website.

No comments:

Post a Comment

There was an error in this gadget