jerrygarciuh has asked for the wisdom of the Perl Monks concerning the following question:
_____________________________________________________#!/usr/bin/perl -w use strict; use CGI; use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser /; my $q = CGI->new(); my $name = "AnolaFlashcookie"; cookie_check(); sub cookie_check { my $cookie = $q->cookie(-name=>"$name", -value=>"$name", -expires=>'+12h', -path=>'/home/thesite/www/cgi-bin/', -domain=>'thesite.com', -secure=>1); print $q->header(-cookie=>$cookie); my $cookie_set = $q->cookie(-name=>"$name"); if (defined $cookie_set) { print $q->header( "text/html" ), h1("Cookie was set!"); } else { print $q->header( "text/html" ), h1("Cookie was NOT set!"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(cLive ;-) Re: Cookie Not Set
by cLive ;-) (Prior) on Feb 19, 2002 at 22:11 UTC | |
|
Re: Cookie Not Set
by Anonymous Monk on Feb 20, 2002 at 03:32 UTC | |
by jerrygarciuh (Curate) on Feb 20, 2002 at 04:49 UTC |