Create a php function that:
- Let me store data in a cookie (Create)
- Let me fetch data in a cookie (Read)
- Let me delete data in a cookie (Delete)
- Let me update data in a cookie (Update)
DATA:
The data will always be key=pair. (Ex: username="my_value")
BEHAVIOUR:
I also need to have two type of data in the cookie.
1- OnDemand (that get read only if I request it)
2- Permanent (that is always return when I include your function, acting like 'global' variable)
Security:
The cookie need to be encrypted in a really secure way so the user CANNOT play or modify the cookie.