Learn about cookies
Tutorials Shared by the Internet Community
Total Hits - 26876
Total Votes - 105 votes
Vote Up - 46 votes
Vote Down - 59 votes
Domain - www.visualdesigncore.com
Category - PHP/Cookies and Sessions
Submitted By - Devesh Khanna
Submitted on - 2008-03-16 03:24:20
First of all, you must define what you want to do with your script.
Cookies, are used mostly for login systems, and are very similar to Sessions but are different in some way or another.
A Session or Cookie is basically said to be a document on your (YOUR) computer with which you would store information. Cookies such as on this very forum. Somewhere on your computer there is a file that has information that was put and made by this forum. The forum recognizes this cookie, and tells you that you are logged in. Basically, its that "remember me" feature.
A Cookie and Session are very much alike in that they store information. But a cookie can last for as long as you set it, and a session will terminate once the browser is closed. ...