It is late, I am tired of searching for this on the web! Please help a weary monk.
#!/usr/bin/perl
use strict;
use CGI;
my $cgi = new CGI;
print
$cgi->header( -cookie => new CGI::Cookie(
-name => 'ChocolateChip',
-value=> $cgi->param('name'),
-expires => 'Thu, 26-Sep-2002 00:00:00 GMT',
-domain => 'students.cs.byu.edu',
-path => '/'
+ )
)
I would like to know how to set several values in the -value=> part of the cookie (this values come from a form). I would also like to know how to read those values once the cookie is set and have the ChocolateChip cookie to read from (look at the code).
#!/usr/bin/perl
use strict;
use CGI;
my $cgi = new CGI;
my %cookie = $cgi->cookie(-name => "ChocolateChip");
if(defined %cookie)
{
# read from the cookie ChocolateChip to have my document display user
# preferences that were saved int the -value=> part of the cookie
}
-thanks