Update: Fixed typo. print \&setCookie; wasn't what I meant. Rather:#!/usr/local/bin/perl use strict; use warnings; use CGI qw/:standard/; use CGI::Cookie; my $query = 'action'; if($query eq 'Login'){ (); } else { setCookie(); } sub setCookie { my $cookie1 = new CGI::Cookie(-name => 'cookie', -value => 'here', -expires => '+3m', -path => '/root/Desktop', ); print "\nSet-Cookie: $cookie1\n"; print "Content-Type: text/html\n"; print '<meta http-equiv="refresh" content="2">', "\n\n"; }
setCookie();
In reply to Re: Playing with Cookies
by Khen1950fx
in thread Playing with Cookies
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |