Session is more relavant than cookie when it comes to handling data of logged in users. Is is also easier to use.
For example in logout function, instead of using set_cookie() and set the cookie's lifetime to 0, we could use session.pop() to delete data.
Session is more relavant than cookie when it comes to handling data of logged in users. Is is also easier to use. For example in logout function, instead of using set_cookie() and set the cookie's lifetime to 0, we could use session.pop() to delete data.