I have split my database down to X number of records per page, but I dont know how to go back and forth between the pages, I ideally would like something that is on this forum i.e. Pages (26): [1] 2 3 ยป ... Last ยป but would settle form something more basic if it allows me to go back and forth between the pages.
I originally though this worked but after adding more than 10 entries I found out that it didn't after all. ๐
$allmsg=$DBC->query_first("select count(gbook.id) as allmsg from gbook");
$pages =intval($allmsg[allmsg] / $rpp);
if ($allmsg[allmsg] % $rpb) {
$pages++;
}
if ($pages>0) {
echo "Show Page:";
}
for ($i=1;$i<=$pages;$i++) {
$nav = $rpp*($i-1);
echo " <a href=\"index.php?count=".$nav."\">".$i."</a>";
}
if (empty($count)) {
$count=0;
}