
April 28th, 2003, 04:31 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Populate a Scrolling List in Perl via Mysql
HI,
I can populate a scrolling list box in perl by typeing my own values and labels.
How do I populate the scrolling list box with a record set from a query to mysql.
print p ("Category"),
scrolling_list (-name => 'Cat_List"),
-size => 5,
-values => {"1", "2", "3", "4"),
-labels => [ "1" => "cat_1","2" => "cat_2","3" => "cat_3",
"4" => "cat_4"),
I want to replace values and labels with to table colums, Cat_id and Category.
I have tried a few things but all create errors
print p ("Category"),
scrolling_list (-name => 'Cat_List"),
-size => 5,
-values => \@val,
-labels => \@val_label,
|