![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,125
|
![]() I have my pagination stuff working however, its showing me additional pages, for example, lets say I have enough data to fill 3 pages, on page 3 it continues to show 4,5,6,7 etc. even though there is no data to put on those pages.
I *THINK* it has something to do with my calculation in red below? What do I need to change to stop that from happening? ![]() Quote:
__________________
SOMETHING EXTREME IS COMING SOON! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Industry Role:
Join Date: Nov 2011
Location: Poland
Posts: 9
|
This loop looks ok. The section one above looks strange.
Shouldn't it be something like: Code:
echo "Pages: "; echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=1'><< </a> "; // previous page num $prevpage = $currentpage - 1; // show < go back to 1 page echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'>< </a> "; } // end if
__________________
Your contact in Poland. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,063
|
Quote:
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. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,125
|
Got it!
Thank you 👍
__________________
SOMETHING EXTREME IS COMING SOON! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Registered User
Industry Role:
Join Date: Nov 2011
Location: Poland
Posts: 9
|
Quote:
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. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |