View Single Post
Old 10-23-2021, 11:36 AM  
Drachen
Registered User
 
Drachen's Avatar
 
Industry Role:
Join Date: Nov 2011
Location: Poland
Posts: 9
Quote:
Originally Posted by sarettah View Post
You have range set to 2. So lets say current page is 3.

Your loop will go

currentpage - range = 1

to

currentpage + range + 1=6

So you will be putting up links to pages 4, 5 and 6 that do not exist.

Not going to tell you how to fix it. This one is an easy one.

.
This section works as intended. It skips all pages larger than $totalpages.
If after fixing what I posted previously the problem still persists you need to check if $numrows fetches you the number you are expecting. Maybe try printing it just to be sure:

Code:
echo "Number of rows: $numrows"
__________________
Your contact in Poland.
Drachen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote