Trying to submit form buttons or links for displaying extra columns
(which are rooms) from the
database at the bottom of this page, but its not working. Can anyone
help ? Instead of diplaying links for rows
I need to limit the amount of columns across. I'm just testing it with
2 columns across at a time. What I want is a
lline of buttons at the bottom of the page that would allow the user to
display the next 2 columns etc? The code for this starts at the bottom
of page. $page is the beginning column number to look for and $c is the
ending column number.
$b is simply a number for the submit button and $D is the name of the
Day. I am trying to throw the info back to the same file.
Now it is showing 1 button and keeps going back to itself showing the
same data. I can't get more than 1 button to show at the bottom of the
page and its always #1 and shows the same data?
Thanks,
Douglas
#End HTML
print $query->end_html;
$dbh->disconnect;
exit;
}
print " now start the links for the other pages<BR>";
$page="0";
$c="2";
$b="1";
my $method="";
my $action="";
$method="post";
$action="cal_sch.pl";
print "<table><tr>";
#----------------------------------------------------------------------
print $query->startform($method,$action);
my $sth31 = $dbh->prepare("select count(*) from room") or
bail_out("Cannot Connect");
$sth31->execute;
my @carr=();
while (@carr = $sth31->fetchrow)
{
($allroom)=@carr;
if ($c <= $allroom){
#----------------------------------------------------------------------
print $query->hidden(-name=>'dayofweek',-default=>$D);
print $query->hidden(-name=>'room',-default=>$c);
print $query->hidden(-name=>'page',-default=>$page);
print "<td>";
print "<BR><font color=\"red\">";
print $query->submit(-name=> $b );
print "</td>";
$b=$b+1;
$page=$page+2;
$c=$c+2;
}
}
print "</tr></table>";
print $query->endform;
print "<A Href=\"linkit.pl\">( Back to schedule Menu )</a>";
print "\ \;\ \;";
print "<A href=\"main.pl\"> (Back to Main Menu) </a>";
#End HTML
print $query->end_html;
$dbh->disconnect;
exit;
--
Douglas Brantz
Computer Consultant
Fine & Applied Arts
Appalachian State University
Boone, NC 28608
828-262-6312 FAX
828-262-6549 OFFICE
brantzdr@stripped
| Thread |
|---|
| • Need Help with displaying links at bottom of Page! | Douglas Brantz | 29 Jul |