#!/usr/bin/perl -w
use CGI qw/:all/;
use CGI::Carp qw(fatalsToBrowser);
use DBI;
#my $dbh=DBI->connect('dbi:mysql:parc_demog:localhost:3306','root','root') or die "Unable to connect: $DBI::errstr\n";

my $dbh=DBI->connect('dbi:mysql:parc_demog:localhost','parcdemog','parc9904')or die "Couldn't connect to database: " . DBI->errstr;


print <<blk;
content-type: text/html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
blk

my $questNo = escapedStr(param("questNo")); 
$msg="The Questionnaire $questNo has been Approved";
my $strsql="UPDATE cf_entry SET isApproved='T' where questNo='$questNo'";
my $rv=$dbh->do($strsql);
$dbh->disconnect;
print<<blk1;
<div style="margin-left: auto;margin-right: auto;margin-top: auto;margin-bottom: auto;width: 500px;height: 70px;background-color: #AAC6FF;color: #333333;vertical-align:middle;">
<p style="border: 1px;margin-top: 100px;margin-bottom: auto;vertical-align:middle;" align="center"><fontface="Verdana"color="#FFFFFF"size="5"><b>$msg</b></font></p>
</div>

</body>

</html>
blk1
