COOKIES!
Posted: Wed Apr 20, 2005 11:20 pm
I have a PHP chat programmed, and it reads the value of a username stored in a cookie ( $_COOKIE['username']
). Now my problem is, when they open another window, with the chat left open, and log out of my site in that window, they are left with a " " (blank) username in the chat.
So to solve this, I tried checking to see if the cookie isn't set, or if the cookie username == "" when they post a message, and attempt to redirect them to the login screen. Neither worked.
How could I solve this problem?
So to solve this, I tried checking to see if the cookie isn't set, or if the cookie username == "" when they post a message, and attempt to redirect them to the login screen. Neither worked.
How could I solve this problem?