Thanks, but that didn't seem to help as much as I'd hoped. I tried to force the save to $Session->param('age'), but now it loses 'name', forcing it to default to ++0, or 1. The result would be to return the correct name and ++$age after the first submit, but "'s new age is 1" and "'s new age is 2" for the subsequent submits. Anything after that continues to repeat the last result.
Sensing that my hidden data isn't being passed after the 2nd invocation (isn't that what CGI::Session is for???), I made the following changes to &add_age to try and get it to force 'name' as well...
sub add_age {
my $age = $Session->param('age');
my $name = $Session->param('name');
++$age;
print $Session->param('name'), "\'s new age is $age";
$Session->param(-name=>'age', -value=>$age, -force=>1);
$Session->param(-name=>'name', -value=>$name, -force=>1);
$Session->save_param($cgi);
print $cgi->start_form,
$cgi->hidden(-name=>'test', -value=>'test'),
$cgi->submit('Next'),
$cgi->end_form;
}
While it now saves the name correctly, it doesn't increment at all past the first good invocation. How do the CGI gods handle this type of ongoing, looping CGI type? Am I assuming incorrectly in that CGI::Session stores full session state information in the db file? As long as it knows my $sid, and I load it correctly, shouldn't the hidden data always be available to me?
*sigh*
-fuzzyping | [reply] [d/l] |