
November 14th, 1999, 09:01 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Hi
I have made some php scripts to log a user into a site and then store the user's nick in a cookie, using this code:
setcookie("cookie",$nick,time()+3600,"/");
(after checking a database, etc)
The problem comes when I try to delete it when the user logs out. I am trying to use this code to do it:
setcookie("cookie");
which doesn't work.
The logging in scipts are stored in /admin, and there are other scripts which depend on the cookie in directories next to /admin (ie /forum, /somethingelse). This initally gave me trouble in that I could log in, but not use the cookie in the other scripts. I fixed this by using the "/" when setting the cookie. I suspect the deletion is a similar problem, but adding "/" still doesn't work.
Any ideas?
|