PHP/Cookie
Posted by: mygsx
Posted on: 2004-03-19 11:53:00
i'm using PHP throughout my pages.. I can create a cookie, but for some reason it won't let me delete them.
I'm using this for a login/logout situation..
here is some of my code:
setcookie("AcctInfo[username]", $username, time()+60*3, "/directory/", ".mydomain.com");
setcookie("AcctInfo[password]", $password, time()+60*3, "/directory/", ".mydomain.com");
The above code sets the cookie fine and it expires it if you stay logged on too long. (I changed the domain and folders for security reasons).
Then when I try to delete the cookie it doesn't work. I tried the following below:
setcookie("AcctInfo");
or
setcookie("AcctInfo['username']");
Thanks in advance for your help.
www.iboostdaily.com