while (my $something = $sth->fetchrow_hashref()) {
$option_list .= qq~\n~;
}
####
popup_menu(-name=>"somename1",
-values=>[%options],
-labels=>[\%options],
-default=>$somename1_value);
####
$sth1 = $dbh->prepare (qq{ SELECT * FROM categories });
$sth1->execute();
%cat_options = ();
while (my $oc111 = $sth1->fetchrow_hashref()) {
$cat_options{$oc111->{id}} = $oc111->{c_name};
}
$sth1->finish();
# And for the popup_menu:
popup_menu(-name=>"cid",
-values=> [%cat_options],
-labels=>{\%cat_options},
-default=>$row->{cid},
-class=>"formfield_left")