What is the different between cookies and session in php?
Answer Posted / abhishek asati
1.Cookies are stored in client side.
Session are stored in server side.
2.Cookies stored limited amount of data.
Session stored unlimited amount of data.
3.Cookies can only store string. Session can store object.
4.We could be save cookie for future reference but session
couldn't. When user close their browser, they also lost the
session.
5. Cookies quite faster than a session.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How to close a session properly?
What does addslashes do in php?
What's the difference between using mysql_ functions and pdo?
What is __ construct in php?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What are the difference between overloading and overriding in oops?
Which is better mysql or sql?
How to return a value back to the function caller?
How should a model be structured in mvc?
What is data structure in php?
What is a persistent cookie in php?
Do I need apache for php?
How to calculate the difference between two dates using php?
What is session expiry?
How to concatenate two strings together in php?