Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookie problems.

Status
Not open for further replies.

fortytwo

Technical User
Apr 18, 2000
206
GB
Hi, I am trying to set a cookie using the line:

[tt]$cookie1 = cookie(-NAME => 'cookie1', -VALUE => "$cookietext", -EXPIRES => '', -PATH => "$path", -DOMAIN => "$domain");[/tt]

if I print out the resulting line ($cookie):

[tt]print &quot;Set-cookie: $cookie1<br>\n&quot;;[/tt]

I get this:

Set-cookie: cookie1=102400102211EDT2121582190; domain=hellacool.co.uk; path=/projects/test/

but when I revisit the page and print out the HTTP_COOKIE environment variable:

[tt]print &quot;Cookie: $ENV{'HTTP_COOKIE'}<br>\n&quot;;[/tt]

I get nothing. I do have cookies turned on in my browser. Does anyone have any ideas?

Thanks [sig]<p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top