[eluser]CIfan1000[/eluser]
Hi,
I am using CI's session class and I am happy with it.
However, it does not seem to generate an error if a user's cookies are not enabled.
I have written a function in a custom library that simply uses CI's get_cookie( ) to check for the cookie created by CI's session class, which I autoload.
I check for this cookie at the beginning of a controller and this works fine except if the page generated by the controller is the very first page the user loads. In this case the cookie has not been set by CI's session class as yet and so get_cookie fails.
This problem is solved if I check for a cookie after the user has pressed a submit button, but I wonder if this is the best way to go.
What is the best way to check if a client's cookies are enabled?
Any help would be appreciated.
Thanks!