in reply to annoying duplicate cookies
I already posted the code I use to reed the cookie. I simply use $ENV{'HTTP_COOKIE'}. That returns a string containing all the cookies for that site on the user's browser. Also, there is no case problem or errant character with the name. I wish it were that somple.
I am aware that a user can log in from more than one PC, but my site only keeps the most recent cookie image from that user as a snap shot, so I don't store a cookie from each PC. Also note that for the cookie I use, I set the expiration to 1 year, so the cookie hangs around for a lot longer than many cookies do. If you use cookies, you may be having this problem, but aren't aware of it either because your expiration is so short, or an old duplicate cookie won't cause problems in your code.
The code to write the cookie is...
. . $co = new CGI; . . . $newunp = join('|',@batch); $ck_unp = $co->cookie( -name=>'unp', -value=>$newunp, -expires=>'+365d' ); print $co->header(-cookie=>$ck_unp); . .
Again, thanks for any help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: annoying duplicate cookies
by eejack (Hermit) on Jun 24, 2001 at 22:50 UTC |