What is the different between cookies and session in php?

Answer Posted / deepinder

Cookies
- stored on CLIENT machine
- amount of data to be stored is LIMITED
- it can only store STRINGS
- quite FASTER than a session

Session
- stored on SERVER machine
- amount of data to be stored is NOT LIMITED
- it can store OBJECTS
- quite SLOWER as compared to cookies

Is This Answer Correct ?    38 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the variables in php?

548


What is split function in php?

498


How can we increase execution time of a php script?

483


Is multilevel inheritance possible in php?

493


Explain what are some new features introduced in php7?

480






What does the php error 'parse error in php - unexpected t_variable at line x' means?

608


What is the use of print_r function in php?

504


What is stripslashes php?

503


Does php have a future?

503


How can you get web browser’s details using PHP?

508


What does $_cookie means?

560


What is an operator in php?

560


How to convert a string to lowercase in php?

549


How do you create an array in php?

534


Explain the ternary conditional operator in php?

590