Sorry if this has been posted before, I haven't been able to find the answer so far.
Is there a way to directly use a template tag to retriever a cookie? I have been able to pull this off using globals, but wonder if there is a better way.
I did it by setting a new global variable equal to:
use GT::CGI;
my $cgi = new GT::CGI;
$cgi->cookie('cookie_name')
}
Call that global variable in a template and it prints the value of the cookie by that name.
Any ideas?
Michael Coyne
seaturtle.org
Is there a way to directly use a template tag to retriever a cookie? I have been able to pull this off using globals, but wonder if there is a better way.
I did it by setting a new global variable equal to:
Code:
sub { use GT::CGI;
my $cgi = new GT::CGI;
$cgi->cookie('cookie_name')
}
Call that global variable in a template and it prints the value of the cookie by that name.
Any ideas?
Michael Coyne
seaturtle.org