greymoose has asked for the wisdom of the Perl Monks concerning the following question:
This one doesn't (i.e. no cookie):# Process form and set cookies my ($cat) = param('butCat'); my ($typ) = param('txtTyp'); my ($to_set) = cookie(-name => 'cat', -value => $cat, -path => '/', ); my ($to_set_a) = cookie(-name => 'bus_com', -value => $typ, -path => '/', ); print header(-cookie => [$to_set, $to_set_a]);
I have checked for the cookie manually on the browser as well as using cookie('adv') in the script called using system. I'm picking that I've done something really simple wrong but I can't for the life of me see how this is different from a dozen or so scripts I have seen online (or from my first script). Any suggestions?$i = 0; while (@record[$i]){ # Set adv_cookie $cgi = CGI->new; $adv = @record[$i]; my ($to_set) = cookie( -name => 'adv', -value => $adv, -path => '/', ); print header(-cookie=>[$to_set]); $i=$i+1; my (@args) = ($path."advlst.cgi"); system(@args);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Another cookie setting question
by wfsp (Abbot) on Oct 11, 2006 at 08:31 UTC | |
|
Re: Another cookie setting question
by lima1 (Curate) on Oct 11, 2006 at 08:32 UTC | |
by greymoose (Beadle) on Oct 12, 2006 at 04:36 UTC |