Continuation Video
• Sessions in PHP | Web and Internet Technol...
Difference between sessions and cookies in PHP?
Cookies are stored in browser as a text file format. It is stored limit amount of data.It is only allowing 4kb[4096bytes]. It is not holding the multiple variable in cookies.
Sessions are stored in server side. It is stored unlimited amount of data.It is holding the multiple variable in sessions. we cannot accessing the cookies values in easily.So it is more secure.
__________________
KEY DIFFERENCE
1. Cookies are client-side files that contain user information, whereas Sessions are server-side files that contain user information.
2. Cookie is not dependent on session, but Session is dependent on Cookie.
3. Cookie expires depending on the lifetime you set for it, while a Session ends when a user closes his/her browser.
4. The maximum cookie size is 4KB whereas in session, you can store as much data as you like.
5. Cookie does not have a function named unsetcookie() while in Session you can use Session_destroy(); which is used to destroy all registered data or to unset some
___________________
Created and Presented By:
K.Dhanamjay
Assistant Professor
Dept of CSE
VEMUIT
+91 9963958647