Form Submit Question and Apache::Request

2001-12-16 Thread El Capitan

I have a form to send to a content handler and wish to use the HTML tag:

SELECT name=multi_list multiple size=4
OPTION value=1One/OPTION
OPTION value=2Two/OPTION
OPTION value=3Three/OPTION
OPTION value=4Four/OPTION
OPTION value=5Five/OPTION
OPTION value=6Six/OPTION
/SELECT

I have a handler like:

###
package testform;

use Apache::Requst;

sub handler() {
my $r = Apache::Request-new(shift);
my @list = $r-param('multi_list') || undef;

# process the list
for (@list) {
# do stuff with each selected form value
...
}
...
...
}
###


For whatever reason, I dont see the multiple values that ware selected on
the form.  Any reason why I cant collect multiple values from a form using
Apache::Request?


K




Re: Form Submit Question and Apache::Request

2001-12-16 Thread Joe Schaefer

El Capitan [EMAIL PROTECTED] writes:

 use Apache::Requst;
 
 sub handler() {
   my $r = Apache::Request-new(shift);
   my @list = $r-param('multi_list') || undef;
   ^^

scalar context is ruining your day :(
Try this instead:

my @list = $r-param('multi_list');

HTH
-- 
Joe Schaefer