Chapter 5 Lab

Building Dynamic Forms from Database Data

The CGI script for this lab:

Tasks to Do for this Lab

Modify the CGI script so that rather than using the built-in values, it:

Solution

Extra for Experts #1

Further modify the CGI script so that the list of books is displayed in alphabetical order.

Extra for Experts #2

Make the CGI script more efficient by:

Thus, the calling sequence looks like this:

prepare( <SQL statement> );
bind_columns( undef, (\$col1, \$col2, \$col3) );
execute( );
while ( ->fetch() ) {
   do something with $col1, $col2, $col3;
}

 
Dan Keller Technical Services © 2000