I have this page where I display arrows (back, forward) when there is more to read.
If you are looking at page=1, you only see the forward-button
If you are looking at page=2 and there's a page3, you see both the back button (to page=1) as well as the forward-button (to page=3).
What shall I do in order for it to only display the back-button when I'm standing on the last page?
Here's how my current code look like
if(mysql_num_rows($result8)>1) {
$sid3 = $_GET['page'];
//if you are not on page 1 and there's a following page
if ($sid3>1){
echo "<a href=\"main.php?kid=$kkid&page=" . ($page-1) . "\"><br><img src=\"layout/back.jpg\" border=\"0\"></a> ";
echo "<a href=\"main.php?kid=$kkid&page=" . ($page+1) . "\"><img src=\"layout/next.jpg\" border=\"0\"></a>";
}
//if you are on page=1
else if ($sid3==1) {
echo "<a href=\"main.php?kid=$kkid&page=" . ($page+1) . "\"><img src=\"layout/next.jpg\" border=\"0\"></a>";
}
how should my third if, look like? If should print out this:
if (this is the last page) {
echo "<a href=\"main.php?kid=$kkid&page=" . ($page-1) . "\"><img src=\"layout/back.jpg\" border=\"0\"></a>";
}