Hi Monks, I previously extensively programmed in CGI and Perl about 10 years ago. I am just back to it building an e-commerce website for a new business venture. I still have my old code but trying a write a simple cookie has thrown me. The below CGI prograpm runs fine and redirects correctly to the required Perl program but it does not create the cookie as I would expect. I know I am rusty but I have agonised for the past few hours over it. Any help as to what I have done wrong? A big thanks in advance. My code is as follows:
use CGI () # $mc_form_member_name is extracted from the Member Database Table $mc_cookie_domain_name = ".sample.com"; $mc_cookie_expiration_time = "+2h"; $mc_cookie_name = "Order_Cookie"; $mc_cookie_value = $mc_form_member_name; my $cgi = CGI->new(); my $cookie = $cgi->cookie(-name => $mc_cookie_name, -value => $mc_cook +ie_value, expires => $mc_cookie_expiration_time, domain => $mc_cookie +_domain_name); print $cgi->redirect(-url => 'https://www.sample.com/cgi-bin/confirm_a +ccount_2.pl', -cookie => $cookie); #End of Create Cookie
In reply to CGI Cookie creation problem by Nicko2004
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |