Welcome Guest, Not a member yet? Register   Sign In
Does CI check if cookie is enabled?
#1

[eluser]doors[/eluser]
I need to know if I need to check if a user has disabled cookies in their browsers.

Does CI check for this already and if they do, what message will be shown?
#2

[eluser]Phil Sturgeon[/eluser]
Nope it doesnt do this already. You will need to handle this yourself im affraid.
#3

[eluser]doors[/eluser]
You have any idea how to do this? I have the following code but it's not working:

Code:
set_cookie('test', 'test', 0);

if (get_cookie('test') == 'test'){
   echo 'Cookie is enabled';
}

Why would this not work?

When I use $_COOKIE['test'] it works. So why when I use get_cookie() it doesn't.




Theme © iAndrew 2016 - Forum software by © MyBB