CodeIgniter Forums
how to know the same user - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forum-17.html)
+--- Thread: how to know the same user (/thread-63548.html)



how to know the same user - rchiu5hk - 11-12-2015

Dear all,

I want to store the session or cookies of the user. When he is back, I know he is previous one, then show something information to him according to the action he did in the website.
I have set the session but find that it is always changing after several mins. Then I cannot know he is previous one.
Do you know What I mean? Please help!!


RE: how to know the same user - Martin7483 - 11-12-2015

You should use a cookie for that. Store the info you want in it and check if the cookie exists when a user is on your website. If you are in Europe, or have visitors from Europe you are required by law to give notice to the user that you will be storing a tracking cookie. And the user must be able to reject this cookie if they don't want to be tracked.