Sessions
Introduction
A session is a way to store information (in variables) to be used across multiple pages.
Unlike a cookie, the information is not stored on the users computer.
Assign the value
To add a value to an existing key or create it if it does not exist and assign the value to it.
and You can change key name of variable.
You can use flash session to remove key after showing it once.
Check key
To check if a key exists, it returns true, and if it doesn't, it returns false.
Get value
Get value of key.
You can set a default value when the key is not present.
and you can get all keys using all() method.
Delete keys
You can delete the key using delete() method.
You can delete all the keys use destroy() method.
Last updated