An easy way to determine what is happening behind the scenes
with HTML is to look at it without any HTTP interpretation. For example, running your example on the command line give me:
Set-Cookie: USER_ID=1; domain=.robotskull.com; path=/; expires=Thu, 16
+-May-2002 20:48:56 GMT
Date: Tue, 16 Apr 2002 20:48:56 GMT
Content-Type: text/html; charset=ISO-8859-1
(If you're on Windows or some other non *nix system and the command line is a new concept for you,
I suggest you get used to using it on occasion. For some tasks it simply can't be beat.)
Update: It's a subtle bug that often catches new cookie programmers (I know it caught me) -- Don't forget that the page that SETS the cookie can't SEE the cookie. (as in, the same section of code that calls cookie() to set a cookie can't then retreive the value by another cookie call, because the values you're retrieving are the cookies that were previously set. Any new cookies can be read on subsequent pages.) |