Database Reference
In-Depth Information
my $cnum = param ( "chapter" );
# Missing or malformed chapter; default to chapter 1.
$cnum = 1 if ! defined ( $cnum ) || $cnum !~ /^\d+$/ ;
# Arrange the page panels as a one-row, three-cell table:
# Left panel: List of chapters as hyperlinks (except for current chapter
# as bold text)
# Middle panel: Spacer
# Right panel: List of current chapter's verses
$page .= table ( Tr (
td ({ - valign => "top" , - width => "15%" },
get_chapter_list ( $dbh , $cnum )),
td ({ - valign => "top" , - width => "5%" }, " " ),
td ({ - valign => "top" , - width => "80%" },
p ( strong ( $title )) . get_verses ( $dbh , $cnum ))
));
$dbh -> disconnect ();
$page .= end_html ();
print $page ;
See Also
esther2.pl examines its execution environment using the param() function. Recipe 20.5
further discusses web script parameter processing.
Recipe 20.10 discusses another navigation problem: how to split display of a result set
across multiple pages and create previous-page and next-page links.
19.6. Storing Images or Other Binary Data
Problem
You want to store images in MySQL.
Solution
That's not difficult, provided that you take the proper precautions for encoding image
data.
Discussion
Websites are not limited to displaying text. They also serve various forms of binary data
such as images, music files, PDF documents, and so forth. Images are a common kind
Search WWH ::




Custom Search