Hello,
I'm querying my DB for a number of records, then printing those records based on some limiting to display a certain number of records per page.
I'm having an issue though...
When my page navigation starts to build beyond 18 pages it starts making the table the page numbers are being built in to go beyond my table dimensions, causing the design to break apart....
So, what I need to do is to build the pagnation into another row once it hits 18, but I'm having some issues doing so.
Maybe someone can give me some advice?
Here's my pagnation code as it is...
//==================================
// START PAGE LIST
//==================================
$pagelist .= "<table cellpadding=4 cellspacing=0 border=2 bordercolor='#FFFFFF' bgcolor='#F0F0F0' class='table_thin' align='center'><tr>";
//Build PREVIOUS Link
if($page > 1) {
$prev = ($page - 1);
$pagelist .= "<td><a href='".$PHP_SELF."?page=$prev' class='main3'><< Previous Page</a></td>";
}
//Build Pagnation
for($i = 1; $i <= $total_pages; $i++) {
if(($page) == $i) {
$pagelist .= "<td><span class='main4'>$i</span></td>";
} else {
$pagelist .= "<td><a href='".$PHP_SELF."?w=$yearWeek&page=$i' class='main3'>$i</a></td>";
}
}
//Build NEXT link
if($page < $total_pages) {
$next = ($page + 1);
$pagelist .= "<td><a href='".$PHP_SELF."?w=$yearWeek&page=$next' class='main3'>Next Page >></a></td>";
}
$pagelist .= "</tr></table>";
//==================================
// END PAGE LIST
//==================================
All help is appreciated!
Thanks in advance!