I was having some trouble with the setcookie function in IE6.
For some reason, the same code that worked in IE5.5 just fine, crapped out in IE6 and wouldn't set the cookie. I figured it out by just using the header() stuff to send it, but I was wondering if anyone else had had similar troubles?
Old code:
setcookie("CookieName","1",time()+3600,"/",".domain.com");
New code:
$now=time()+3600;
$date = date("l, d-M-y H:i:s", ($now));
header("Set-Cookie: CookieName=1; expires=$dateGMT");
The second one works, for those having the same trouble with IE6, but, I still can't get the first one to work. Is this something with the setcookie function and PHP or am I just stupid?
-enygmadae