In case of Cookie, the information is stored in user's browser while in caseof Session, information or data is stored
on the server and the same is then associated through a short session ID string, called as SID.
Session also overcomes many drawbacks related with the Cookies like Cookies are not much secure as using form data
and query strings, any hacker can easily change a cookie's contents in order to destroy your application and even
affect your hardware badly while in case of a session, SIDs generated by PHP are unique and impossible to guess or access
and hence it is very difficult for a hacker to access and affect the session data. You can store more data in a session
as compared to a cookie.