PHP - Guestbook

Al Neri

Diamond Member
Jan 12, 2002
5,680
1
81
I have a whole guestbook layout set up.. its just that it goes on and on and on forever, how do i split it to 20 results a page? ive been trying to come up with a concept and i just cant. :-\
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
1. Count the total guestbook entries
2. Count the number of pages, based on $count_total / $count_per_page -> result ==> $page_count
3. When doing query to database (which I assume is where you store the data), set the limit to $count_per_page, starting from $page_count * $count_per_page
4. Display the results
5. Display the page numbers at the bottom

hope it makes sense