below is a very simple testing script to display and select multiple options from a list of checkboxes. the first grouping all use the same checkbox name "sitelist" for each checkbox, the second grouping uses a different name for each checkbox. the first group only returns the first selection, regardless of how many are chosen. the second group returns each selected value, as expected.
what i have been able to find so far indicates i should be able to retrieve every selection regardless of whether the checkbox name is common or unique to each checkbox, but this isn't happening. any clarification on what i'm missing or misunderstanding (as well as any associated documentation) would be greatly appreciated. thanks, joe ############################################# #!/usr/bin/perl use CGI qw(:all); use CGI::Carp qw(fatalsToBrowser); my $message = ""; foreach my $param (param()) { my $value = param($param); $message .= "param \"$param\" = \"$value\" <br />"; } my $program_name = __FILE__; $program_name =~ s/^.*\///; # remove all path, leaving only actual program name my $checkbox = " checkbox name = \"sitelist\" (same for each option) <br /> <input type=\"checkbox\" name=\"sitelist\" value=\"arlington\"> Arlington <br /> <input type=\"checkbox\" name=\"sitelist\" value=\"houston\"> Houston <br /> <input type=\"checkbox\" name=\"sitelist\" value=\"plano\"> Plano <br /><br /> checkbox name changes with each option <br /> <input type=\"checkbox\" name=\"arlington\" value=\"arlington\"> Arlington <br /> <input type=\"checkbox\" name=\"houston\" value=\"houston\"> Houston <br /> <input type=\"checkbox\" name=\"plano\" value=\"plano\"> Plano <br /><br /> <input type=\"submit\" name=\"submit\" /> "; # begin displaying web page print header("text/html"); print start_html(); print start_form(); print " $message "; print "<br /> $checkbox <br />"; print end_form(); print end_html; ################################## -- since this is a gmail account, please verify the mailing list is included in the reply to addresses