I am having difficulty getting my canned query to post the db entries in the first print statement. The column names post and the link to the next entries show up.
#!/usr/bin/perl
require "dbi-lib.pl"; #library from lesson 7#
#----------------------#
# User Variables #
#----------------------#
$table_name = "sqlguestbook";
#----------------------#
# Main Body #
#----------------------#
&parse_input;
&print_header;
&initialize_dbi;
&display;
exit;
#----------------------#
# Function #
#----------------------#
sub display {
$start = $FORM_DATA{'start'};
if (!$start){
$start=0;
}
#$previous = $start + 10;
print "
| Number | Name | Date of Submission | ";Message | |
| $count | $name | $entry_date | ";$message |
print "
\n";
print "
\n";
# prints the previous link
if ($start) {
print "Click for next ten entries";
}
else{
print "Click for previous ten entries";
}
}
}
