D
deryk_deguzman
hi. i've spent 5 hours trying to solve this problem but can't seem to
handle it.
my code to set a cookie goes like this:
use CGI;
$qs = new CGI;
$ckName = cookie(-name=>'name', -value=>'aaa');
print $qs->header(-cookie=>$ckName);
then i have a link on that page that goes to a cgi file that has:
use CGI;
$query = new CGI;
print $query->header;
print $query->start_html();
$cookie = $query->cookie('name');
print "IT IS: $cookie";
my problem is that the second file isn't getting the cookie. it's in
the same directory as my first cgi file but can't find the cookie. what
can i do to fix this?
also, when i print out $ckName in my first file, it prints out
"name=blah; path=/" to my page. but when i do something like:
$mycookie = $qs->cookie('name');
print $mycookie;
nothing comes out.
i'd really appreciate any help i can get with this. thanks.
handle it.
my code to set a cookie goes like this:
use CGI;
$qs = new CGI;
$ckName = cookie(-name=>'name', -value=>'aaa');
print $qs->header(-cookie=>$ckName);
then i have a link on that page that goes to a cgi file that has:
use CGI;
$query = new CGI;
print $query->header;
print $query->start_html();
$cookie = $query->cookie('name');
print "IT IS: $cookie";
my problem is that the second file isn't getting the cookie. it's in
the same directory as my first cgi file but can't find the cookie. what
can i do to fix this?
also, when i print out $ckName in my first file, it prints out
"name=blah; path=/" to my page. but when i do something like:
$mycookie = $qs->cookie('name');
print $mycookie;
nothing comes out.
i'd really appreciate any help i can get with this. thanks.