[thelist] Processing Multiple selects from drop downlist in perl

Keith cache at dowebs.com
Wed Dec 12 12:19:08 CST 2001


Adrian 

> I did some research and came up with the very little of any help.  The
> best comment I say was that it is seldom used because its hard to work
> out at the server end.
> 
> I think I need to get the selections into an array or hash (not sure
> which) and then somehow process the hash/array to enter the selections
> into my db (mysql)
> 
> Perhaps putting all the selections from the drop down into a variable
> delimited by : or ; and inserting that into the column in the db?

That's how I do it. Say the select is named "xx" and user selects 3 
oprtions, 3 separate xx=value arrive at the server. So in the parsing 
routine I push then into an array instead of hashing them

if($name eq "xx){push(@xx,$value)}
else{$form{$name}=$value}

then later 

$xx=join(":", at xx);

keith




More information about the thelist mailing list