On 12-06-11 03:51 PM, Mark Haney wrote:
Here's a portion of the html:
<input type="checkbox" name="DoW" value="M"/>M <input type="checkbox"
name="DoW" value="T"/>T
I thought that the values of each selected checkbox would be passed via
the variable name 'DoW' (as in 'MTWTH' or 'MWF'), but that doesn't look
like the case.
The data is passed to a CGI script that does this before passing to a
sub that dumps the data to a database table:
my %attrs = (
shift_name => $q->param('shift_name'),
shift_beg => $q->param('shift_beg'),
shift_end => $q->param('shift_end'),
factory_id => $q->param('factory'),
shift_days => $q->param('DoW'),
shift_days => [ $q->param('DoW') ],
# In list context, CGI::param will return every value.
);
When I run the script I get this in apache's error.log:
DBIx::Class::ResultSet::new(): No such column T on
Where the 'T' is obviously the T in Tuesday since the Monday and Tuesday
are the only two I selected. I'm missing something simple, but I've not
found any help on Google explaining how checkbox data is passed in a form.
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
_Perl links_
official site : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help : http://perlmonks.org/
documentation : http://perldoc.perl.org/
news : http://perlsphere.net/
repository : http://www.cpan.org/
blog : http://blogs.perl.org/
regional groups : http://www.pm.org/
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/