Browse Sections

Generating Dynamic HTML using DBI and CGI Modules


my $sth = $db->prepare('SELECT Name from members order by Name');
# Execute SQL statement
if ($sth->execute() ) {
# Fetch a row at a time
my @fld;
while (@fld = $sth->fetchrow_array() ) {
print "$fld[0]<br />\n";
}
}

Ending the HTML Page

To end the HTML, we generate the end part of the HTML page:
print $c->end_html;

For more information on the DBI module, check out my previous article.
For more information on the CGI module, check out my previous articles.
The copyright of the article Generating Dynamic HTML using DBI and CGI Modules in Perl is owned by Philip Yuson. Permission to republish Generating Dynamic HTML using DBI and CGI Modules in print or online must be granted by the author in writing.

Go To Page: 1 2

Articles in this Topic    Discussions in this Topic