#!/usr/bin/perl use CGI qw(:standard); print header; print start_html, start_form(-method=>'POST', -action=>'http://www.winterspd.com/cgi-bin/access.pl'), print "
Winters Police Department
Local Warrants Check
", "
",
"Enter Last Name \t", textfield(-name=>'Last_Name', -size=>16, -maxlength=>24),
"
Enter First Name \t", textfield(-name=>'First_Name', -size=>16, -maxlength=>24);
print "
", "If you find that you, or someone you know is wanted, please call the City of Winters Police Department, or the City Municipal Judge, Gary Moore, and make arrangements to take care of your Warrants.
It should be understood that although you may find warrant information on this page, it does not necessarily mean that the warrants are active, and that warrant status may change between updates of the page.
Thank you for your interest."; print "
", submit(-name=>'Submit'), reset(-name=>'Reset Form'); print end_html; __________________________________________________ #!/usr/bin/perl use CGI qw(:standard); $query = new CGI; # Get CGI form data from accessStart.pl $Lastname = $query->param('Last_Name'); $Firstname = $query->param('First_Name'); #Windows-based Perl/DBI/MS Access example use DBI; #open connection to Access database my $dbh = DBI->connect('dbi:ODBC:LEDR'); #prepare and execute SQL statement if ($Firstname ne ""){ $sth=$dbh->prepare("SELECT [Master Name].[Last Name], [Master Name].[First Name], [Master Name].[Middle Name], [Master Name].[Date of Birth], Locals.[Warrant (Cause) Number], Locals.[Offense Committed], Locals.[Current Status], Locals.[Date issued] FROM Locals INNER JOIN [Master Name] ON Locals.[Person ID] = [Master Name].[Person ID] WHERE ((([Master Name].[Last Name])='$Lastname') AND (([Master Name].[First Name])='$Firstname'))");} if ($Firstname eq "") { $sth=$dbh->prepare("SELECT [Master Name].[Last Name], [Master Name].[First Name], [Master Name].[Middle Name], [Master Name].[Date of Birth], Locals.[Warrant (Cause) Number], Locals.[Offense Committed], Locals.[Current Status], Locals.[Date issued] FROM Locals INNER JOIN [Master Name] ON Locals.[Person ID] = [Master Name].[Person ID] WHERE ((([Master Name].[Last Name])='$Lastname'))");} print header(); print start_html; print ("
Winters Police Department
Local Warrant Check
"); $sth->execute; while (@row=$sth->fetchrow_array()){ $firstname=$row[1]; $midname=$row[2]; $dob=$row[3]; $warrantnum=$row[4]; $offense=$row[5]; $status=$row[6]; $date=$row[7]; print "
";} if ($Firstname eq ""){print "