Use CGI::Ajax;
Use CGI;
use DBI;
my $ajax = new CGI::Ajax('report' => \&report);
sub report
{
my $input1 = shift;
my $input2 = shift;
$dbh=DBI->connect("DBI:mysql:$db;host=$host","$user","pass");
$re=$dbh->perpare("select * from table where firstname="$input1" and lasname="input2");
return $re
}