This part of the code here ...
$DISPPAGE = 3;
#DISPPAGE is the number of items displayed per page.
$NUMPAGES = ceil($QNUM / $DISPPAGE);
#NUMPAGES to show how many pages you WILL get.
... what determines how many records are shown.
$DISPPAGE = 3;
Means 3 records per page (because right now there's only 15 records in the D😎 - so theoretically if the pagination worked it would be 5 pages with three records each - however each of the 5 pages generated show the same 3 records as it doesn't show records 4-15
This code:
$NUMPAGES = ceil($QNUM / $DISPPAGE);
derives it's total from $QNUM (total number of records) divided by $DISPPAGE (how many records per page) to show $NUMPAGES (how many pages we will end up with for pagination)
I hope that makes better sense now?
I'm still not sure where at I messed up in the code because it works - but just not the way it's supposed to.
😕