Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Cookie Problem

by mda2 (Hermit)
on Jun 10, 2005 at 16:17 UTC ( #465591=note: print w/replies, xml ) Need Help??


in reply to Cookie Problem

You are trying to get cookie after send it to browser. It's only available at next request, it accepted!

Define your value with same of cookie set, or try to redirect, and check cookie avaliable.

$exit_link = "$ENV{'QUERY_STRING'}"; $cookie = $query->cookie(-name=>'aa_exit', -value=>$exit_link, -expires=>'+4h', -path=>'/'); ... $theCookie = $query->cookie('aa_exit'); if(!$theCookie){ $exit_link = "$ENV{'QUERY_STRING'}"; # $theCookie = $query->cookie('aa_exit'); WRONG $theCookie = $ENV{'QUERY_STRING'}; ... }

--
Marco Antonio
Rio-PM

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://465591]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2019-12-06 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (157 votes). Check out past polls.

    Notices?