+ 5
What is different between session and cookie?
Session data is stored in server and cookie store data in the visitors .What should be used session or cookie?
2 Réponses
+ 8
Sessions allow you to store away individual pieces of information just like with cookies, but the data gets stored on the server instead of the client. A session is used to store the information from the web pages. ... With PHP session you can't access it anywhere outside PHP script.
https://stackoverflow.com/questions/6253633/cookies-vs-sessions
0
Also a Session is destroyed when a user closes the browser.