$q = new CGI; print $q->start_html(); print $q->startform; print $q->strong("Compliance Engineer Details"); print $q->br; print $q->br; print $q->popup_menu( -name=>'Compliance Members', -values=>['Alan Covell','Andy Hu','Chris Russo','Darren Wei','Dianfang Gao','David Mcmillan','Jin Wu','Jingyang (Johnson) Liu','Kenneth trant','Sridhar Gundubogula','Steve Nixon','Stephen willis','Vaibhav Mehrotra','Wolfgang Kandek'], -default=>'Vaibhav Mehrotra', ); print $q->submit('action','submit'); $Name = $q->param(-name=>'Compliance Members'); print $q->endform; print $q->end_html; my $tankdbh = QualysVulnQA::bugsopen(); sub general_query { my $dbh = shift @_; my $query = shift @_; my $sth = $dbh->prepare($query) || die "Prepare error: $! for sql: $query\n"; $sth->execute() || die "Execute error: $!\n"; my $results = $sth->fetchrow_array(); return $results; } my $Compliance_Member = "select count(*) as count1,bug_status from bugs,profiles where (bugs.qa_contact=profiles.userid) and product_id = 19 and component_id = 271 and profiles.realname='$Name' group by bug_status"; my $sth = $tankdbh->prepare($Compliance_Member) || die "Prepare error: $!\n"; $sth->execute() || die "Execute error: $!\n"; my %bug_d; while (my $rec = $sth->fetchrow_hashref) { $count = $rec->{count1}; $bug_status = $rec->{bug_status}; $bug_d{$bug_status} = $count; } foreach my $num (keys %bug_d) { $bug_detail{$num} = "$bug_d{$num}"; }