Howdy list, 

You know how some sites will say "You need to enable cookies for this site to use this 
service"

As much as I hate to do stuff that requires cookies, there is a project I'm doing that 
requires cookies.

I don't think you can set a cookie in a header then get the value of that cookie in 
the same execution of the script.
So what I've done is, 

my $nocookies;
if(!shouldhavecookie) {
        a) set the cookie header 
        b) do a Location: header to $cgi->self_url with shouldhavecookie=1 appended
else {
        a) fetch cookie
        b) if(cookie value not set) { turn on cookies freak! $nocookies = 1  }
}

if(!$nocookies) { do whatever it does` that needs cookies }

Is there a better way to do that without having to do redirects?

TIA

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to