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'};
$previous = $start - 10;
print "
| Number | Name | Date of Submission | ";Message | |
| $count | $name | $entry_date | ";$message |
print "
\n";
print "
\n";
if (!$start ){
#$start = 0;
print "Click for next ten entries";
}
elsif ($start == 0) {
print "Click for next ten entries";
}
elsif ($previous == $start - 10) {
print "Click for previous ten entries";
}
else {
print "Click for next ten entries";
}
}
}
