Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
I've read through the POD for CGI.pm and I'm still confused on how to save the state of a form.
I've got the following code running at present. The checkboxes are being built from a hash table.
sub printboxes{ foreach my $key ( sort keys %list ){}; print header; print start_html('Comics Configuration Page'), start_form, $query->checkbox_group(-name=>'comics', -values=>[grep {!/html?$/} sort %list +], -columns=>3), submit(-name=>'Save my choices!'), end_form, br, print end_html; open FH, '>'.$file; $query->save('FH'); close FH; }
My assumption was, after reading the POD, that I could save the state of the form ( which boxes were checked ) but when I look at the file it produces, I've got one equals sign there, so it seems that it isn't picking up anything. I've also seen the filehandle written as 'FH', FH, and \*FH and have tried all these variants and still no luck.
If anybody can help with this I'd greatly appreciate it!
There is no emoticon for what I'm feeling now.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Saving state in cgi.pm question
by tadman (Prior) on Nov 25, 2002 at 05:20 UTC | |
|
Re: Saving state in cgi.pm question
by Zaxo (Archbishop) on Nov 25, 2002 at 05:27 UTC | |
by Popcorn Dave (Abbot) on Nov 25, 2002 at 07:07 UTC | |
|
Re: Saving state in cgi.pm question
by LTjake (Prior) on Nov 25, 2002 at 12:57 UTC | |
|
Re: Saving state in cgi.pm question
by UnderMine (Friar) on Nov 25, 2002 at 13:06 UTC | |
|
Re: Saving state in cgi.pm question
by Starky (Chaplain) on Nov 26, 2002 at 06:56 UTC |