Continuous Page Load Content PHP
I am trying to load content from my database 10 items at a time as the user scrolls through my web page. Right now I can load 10 items on scroll, but how can I load the next 10 ite
Solution 1:
You need to implement "pagination". This is basically an offset and a limit to fetch X rows starting at the offset. If you google for "php pagination tutorial" you'll find plenty of tutorials, here is one of them.
I think describing the whole concept here in detail with code examples would become a very long answer and there are plenty of tutorials, so just check them out.
Solution 2:
You need to send a parameter to the server script telling it where to start from. You can then use ORDER BY
and LIMIT
to select the appropriate records in the database to add.
Post a Comment for "Continuous Page Load Content PHP"