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


Please Help Members By Posting Answers For Below Questions

What is difference between core php and framework?

456


What are the string functions in php?

517


What is use of preg_replace in php?

511


When is a conditional statement ended with endif?

496


How php statement is different from php script?

526






Can we extend two classes in php?

517


What is Type hinting in PHP?

707


What are the characteristics of php variables?

515


How to use http headers inside php?

558


Are php sessions cookies?

503


Write a program to find the factorial of a number in php?

518


How to replace a substring in a given string in php?

541


What type of operation is needed when passing values through a form or an url?

521


How does session work in php?

527


What is use of htmlspecialchars php?

507