Hi... recently i copied a code here in phpbuilder's tutorial lessons on how to make a previous and next page... I want to know how i can highlight the number when it is showing that page... for example the page is on page one, i want to highlight the number 1 so that the user will know where he is...
Here is my code... thank you guys!!!!
print "<br>";
if($page != 1) {
$pageprev= $page - 1;
echo "<A HREF=$PHP_SELF?page=$pageprev&products=$products class='after'><img src='2arrow_left.gif' width='12' height='8' alt='2arrow_left.gif (82 bytes)' border='0'></A> "; // if page is not equal to one, prev goes to $page - 1
}
else {
echo "<p>";
//echo "<A HREF=$PHP_SELF?page=$page&products=$products class='after'><img src='2arrow_left.gif' width='12' height='8' alt='2arrow_left.gif (82 bytes)' border='0'></A> "; // Otherwise, PREV reloads the page
}
$numofpages = $totalrows/$limit;
for($i= 1; $i < $numofpages; $i++) {
echo "<font face='Arial' size='1'><A HREF=$PHP_SELF?page=$i&products=$products class='after'>$i</A> </font>"; //make number navigation
}
if($totalrows%$limit != 0) {
echo "<font face='Arial' size='1'><A HREF=$PHP_SELF?page=$i&products=$products class='after'>$i</A> </font>"; ////if there is a remainder, add another page
}
if(($totalrows-($limit$page)) > 0){
$pagenext = $page + 1;
echo "<a HREF=$PHP_SELF?page=$pagenext&products=$products class='after'><img src='2arrow_right.gif' width='12' height='8' alt='2arrow_right.gif (82 bytes)' border='0'></A> "; // if the totalrows - $limit $page is > 0 (meaning there is a remainder), leave the next button.
}