Jump to content

PHP Cookie Problem


woolyboy76

Recommended Posts

Hi all,

 

My first post, so I apologize in advance if this topic has been beaten to death on these forums.

 

I'm still a novice to PHP, and I'm having some strange problems with cookies.

 

I'm using a very simple login system.  When the user successfully logs in, an authorization cookie is created (entitled "auth" -- very fancy, I know).  If they have "auth" in their system, they can access the registered only section. 

 

When I tested the site, I had no problems.  However, now that I've opened up the program to all my students (I'm a teacher), the cracks have begun to show. 

 

A few students told me that they were able to successfully log in at home, but when they attempted to access the registered only section, the site asked them to log in again. 

 

I figured it was an issue with their browser cookie settings. 

 

However, then something really strange happened. 

 

I brought my entire class to the computer lab to use the site.  The same things happened on 50% of the computers.  However, when I looked at the cookie preferences, I could see that the "auth" cookie had been set.  Even wierder, when the class was over, and the next group of students came in, some computers that previously did not work now did, while others that previously worked now did not. 

 

Does this problem sound familiar?  I'm ready to completely revamp my web site to use sessions instead, but if there is a simple solution, maybe I can skip that step. 

 

Thanks so much,

 

Jim

Link to comment
https://forums.phpfreaks.com/topic/37904-php-cookie-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.