Hello community :
I have created a for loop to be able to display the link to another page once there is 9 rows displayed on one page t will create a another link to go to page 2 and then page 3 and then page ..... so on.
But when I'm in on page 1 and then click on page 2 it gives error.
The link to where it points and gives error to page 2 is :
http://www.fakedomain.com/product.php?catid=&subcatid=&page=2
When I manually put in the URL of the web browser the numbers 8 21 it works fine
http://www.fakedomain.com/product.php?catid=8&subcatid=21&page=2
Seems the loop is not processing it.
Here is the for loop code :
for($page = 1; $page <= $totalPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page "; // no need to create a link to current page
}
else
{
$nav .= " <a href=\"$self?catid=$catid&subcatid=$subcatid&page=$page\">$page</a> ";
}
}
if($totalPage > 1) {
echo "<tr><td colspan=3 class=subcategory align=right width='100%'>";
echo $nav;
echo" </td></tr>";
}
?>
I truly appreciate the help. I have been looking all around in this code and no luck so far.
Thanks.