This might be the wrong place to post this, but since it's /sort of/
perl related, maybe I'll get some help.
I've got a series of checkboxes denoting the days of the week and I want
the ones that are checked to be passed to my CGI script from the form.
Apparently, I'm not getting the method which that checkboxes are passing
the data. 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'),
);
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.
Any ideas?
--
Mark Haney
Software Developer/Consultant
AB Emblem
ma...@abemblem.com
Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU/Linux
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/