DBIx-HTMLTable

 view release on metacpan or  search on metacpan

eg/tablequery.cgi  view on Meta::CPAN

# Create a new query object
my $q = new CGI;

# Retrieve the parameters from the query form
my $user = $q -> param('username');
my $password = $q -> param('password');
my $db = $q -> param('dbname');
my $query = $q -> param('query');

# Connect to the database specified by the user.
my $dbh = DBI -> connect ("DBI:mysql:database=$db;host=desktop;", 
	$user, $password );

# Print the HTML header;
print $q -> header;
print $q -> start_html( "Database: $db" );
print "<body bgcolor=\"#FFFFFF\" TEXT=\"#000000\">\n";

# Prepare and execute the user's query.
if ($query !~ /^\s+$/sm) { 



( run in 0.229 second using v1.01-cache-2.11-cpan-299005ec8e3 )