Sorry for all the mistakes. This is my first time posting a problem. Find the test code below.
Use CGI::Ajax;
Use CGI;
use DBI;
my $ajax = new CGI::Ajax('report' => \&report);
<html>
<body>
<input type="button" value="submit" onclick="setInterval('report([\'ar
+gs__real\',\'args__monk\'],[\'re\'])', 5000)"
</body>
<div id="re"><div>
</html>
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 l
+asname="input2");
return $re
}
This is an example of something I am trying to do. I want this Ajax function to run every 5 seconds to update my html div tag. |