What is difference between session and cookie in PHP ?

Member

by zella , in category: Technology , 4 years ago

What is difference between session and cookie in PHP ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by irwin , 4 years ago
  • Session and cookie both are used to store values or data.
  • cookie stores data in your browser and a session is stored on the server.
  • Session destroys that when browser close and cookie delete when set time expires.

Related Threads:

What is difference Between PHP 5 and 7?
How to register a variable in PHP session ?
What is the difference between == and === operator in PHP ?
How to Create a Composer Package in 2025?
What is difference between Method overriding and overloading in PHP?
How to Use a Stair Stepper Correctly in 2025?