The main difference between sessions and cookies is that a session can hold multiple
variables, and you need not have to set cookies for every variable. By default, the
session data is stored in the cookie wich has an expiry date of zero, which means that
the session remains active only as long as the browser.Once you close the browser, all
the stored information is lost. This behavior can be modified by changing the “session.
cookie_lifetime” setting in “php.ini” from zero to whatever you want the cookie
lifetime to be.