#! /perl/bin/perl use CGI; $query = new CGI; #print $query->header; #print $query->header(-cookie=>$cookie); #print $query->start_html('My cookie-get.cgi program'); #print $query->h3('The cookie is ...'); #Check if cookie is true else, creating a cookie... $theCookie = $query->cookie('aa_exit'); if(!$theCookie){ $exit_link = "$ENV{'QUERY_STRING'}"; $cookie = $query->cookie(-name=>'aa_exit', -value=>$exit_link, -expires=>'+4h', -path=>'/'); print $query->header(-cookie=>$cookie); print $query->h3('The cookie NOW is ...'); $theCookie = $query->cookie('aa_exit'); print "<BLOCKQUOTE>^^^^^\n"; print $theCookie; print "^^^^^</BLOCKQUOTE><br>\n"; }else{ print $query->header; print "<BLOCKQUOTE>*****\n"; print $theCookie; print "*****</BLOCKQUOTE>\n"; } print $query->end_html;
In reply to Cookie Problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |