The following code takes the pages backwards and forwards from 1 to the end, say 1 - 25.
But I would like to start at the end, say page 25, and the next to be 24, 23, 22 etc. to work in reverse. Guidance would be appreciated very much.
(The problem is that the latest is always the last record, and there's where I need the pages to start.)
$next = $GET['id'] + 1;
$previous = $GET['id'] - 1;
$total = 45;
if ($previous > -1)
{
echo '<p><a href="?id=' . $previous . '">Previous</a> | ';
}
if ($next <= $total)
{
echo '<a href="?id=' . $next . '">Next</a><br>';
}