Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
more useful options
 
PerlMonks  

Re: Server getting and utilizing cookie

by jeffpflueger (Beadle)
on Mar 01, 2001 at 20:51 UTC ( [id://61667]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Server getting and utilizing cookie

I just figured this out yesterday for something I'm doing....

my $cgi = new CGI (); my $cookie = $cgi -> cookie ( "WHATEVER" ); if ( defined $cookie ) { #cookie is there and do with it what you want, we'll print it: $cgi -> cookie ( "WHATEVER" ); } else { # Make a cookie my $cookie = $cgi -> cookie ( -name => "WHATEVER", -value => "WHATEVER" ); print $cgi -> header ( -type => "text/html", -cookie => $cookie ); }

Something like that....you'll have to mess with it. I got all my learning about this from O'Reilly's CGI programming With Perl.

Good luck

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://61667]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.