At 14:36 11/04/2001, Gray, Josh wrote:
>I think i've gone brain dead, can someone remind me how to parse input from
>a multiple select form field?

I use the code below...

#Populates variable names with data passed from forms.
sub POPFORMVARS {
    foreach $KEY ($query->param()) {
       $VARNAME = uc($KEY);
       @$VARNAME = $query->param($KEY);
       $$VARNAME = join(",",@$VARNAME);
       #print "$VARNAME is $$VARNAME<BR>\n";
    }
}

If an item is a multiple, it creates it as one variable, but separated by 
commas.  Probably not the nicest way to do it, but it gets me by ;-)

Cheers,

Roland

-- 
Roland Corbet
Systems Administrator & Developer
Psyche Solutions Limited
Chester Road
Cradley Heath
West Midlands
B64 6AB

Tel:    + 44 (0)1384 414183 Ext. 4412
Fax:    + 44 (0)1384 414111
Email:  [EMAIL PROTECTED]
WWW:   http://www.psyche.net.uk

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to