i want to make the select boxes selected based on the values from the database.
code :
my $bug_id = $cgi->param('id');
#query for fetching the datas from the table category_bug_map for updating the select box
my $selectboxcategoryQuery = "SELECT os,cp,service FROM category_bug_map WHERE bug_id=$bug_id";
my $statusQuery2 = $dbslave -> prepare($selectboxcategoryQuery);
$statusQuery2 -> execute();
my($OS,$CP,$ser) = $statusQuery2 -> fetchrow_array();
$vars->{'select_os'} = $OS;
$vars->{'select_cp'} = $CP;
$vars->{'select_ser'} = $ser;
I want to use the variables in template file to make the select boxes selected(updated).How can i perform this?