Jump to content

[SOLVED] Prev | Next


phpSensei

Recommended Posts

Here is the site

 

http://www.render-works.com/clients/solo_client0001/index.php

 

As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this...

 

Help?

Link to comment
https://forums.phpfreaks.com/topic/84683-solved-prev-next/
Share on other sites

http://www.sampsonvideos.com/videos/PHP/PHP_Pagination/

 

 

here is a really good video on how to do pagination. You should not rely on the lowest id and highest id, you should count the results and divide them up X per page based on the number of results independent of the id's of the table.

Link to comment
https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431565
Share on other sites

Here is the site

 

http://www.render-works.com/clients/solo_client0001/index.php

 

As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this...

 

Help?

So you're having troubles displaying the number after Picture2ID= in the URL, am I right?

Link to comment
https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431566
Share on other sites

Here is the site

 

http://www.render-works.com/clients/solo_client0001/index.php

 

As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this...

 

Help?

So you're having troubles displaying the number after Picture2ID= in the URL, am I right?

 

No, that was some leftover of my coding, messed it up...

 

lol I see this is just a simple pagination. Thankyou.

Link to comment
https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431568
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.