#!/usr/bin/perl
require 'cgi-lib.pl';
use Mysql;
$host= shift || "";
$db="nafta";
$|= 1; # Autoflush
$table="naftadb";
print &PrintHeader;
$dbh = Mysql->Connect($host) || print "Can't connect: $Mysql::db_errstr
";
$dbh->SelectDB($db) || print "Can't use database $test_db: $Mysql::db_errstr
";
MAIN:
{
#Get the total number of rows in the table
$sth=$dbh->Query("select * from $table");
$rows = $sth->numrows;
print "Total Registered Users: $rows
"; print "
| ";
print "";
print "Name: $arr[1] "; print ""; print " | ";
print "$arr[0] "; print " | ";
print "$arr[2] "; print " | ";
print "Occupation: $arr[4] "; print " | ";
print "Immigration Status: $arr[5] "; print " | ";
print "From: $arr[6], $arr[7] "; print " | ";
print "Living in: $arr[8], $arr[9] "; print " | ";
print "
|---|---|---|