hi all,
I have a problem in a cgi script i.e result is shown in STDOUT when i run rhis script through command prompt but when i run this script through browser it doesnot show any thing accept emp_nameemp_count
Code:
 
#!C:/Perl/bin/perl.exe 
use DBI;
use CGI qw/:standard/;
$query = new CGI;
$abc = $query->param('first_name');
 
$dbh = DBI->connect("dbi:DB2:VOTE","","") or 
       die "Can't connect to sample database :DBI::errstr"; 
 
  $stmt = "SELECT * from VOTE";
  $sth = $dbh->prepare($stmt);  
#  $sth->bind_param(1,$abc);
 $sth->execute();
print "Content-Type: text/html\n\n";
print <<_HEADER_;
<table>
<tr>
  <th>emp_name</th>
  <th>emp_count</th>
</tr>
_HEADER_
  $sth->bind_col(1,\$col1);
  $sth->bind_col(2,\$col2);
  while ($sth->fetch) {
 
 print "$col1";
        print "$col2\n";
             }
  print "DONE \n";
#while ($row = $sth->fetchrow_hashref) {
#   print <<"_ROW_";
 #  <tr>
 #    <td>print "$row{emp_name}"</td>
 #    <td>print "$row{emp_count}"</td>
 #  </tr>
#_ROW_
#}
print <<_FOOTER_;
</table>
_FOOTER_
$sth->finish;
$dbh->disconnect;
please help me to get out of this