Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the Difference Between Cookie and Session
What is the difference between cookie and session in PHP. I am confused about these two terms people say that sessions are also cookies. Then why not to use Cookies only?

Please explain it to me. Thanks.
Session is defined as a series of consecutive HTTP requests made at designated them intervals by a single user from a single computer on a single Web application. The first request made by a user will generate a new session. Subsequent request are considered to be part of that session. The cookies are stored on the server.

Cookies are little nuggets of information sent by a Web browser along with the HTML output of a page. Cookies have a name and value. The cookies are stored on client's computer.

Forum Jump:

Users browsing this thread: 1 Guest(s)