How to create page links like in forums?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
yosuke_
Forum Commoner
Posts: 64
Joined: Tue Apr 13, 2004 12:29 pm

How to create page links like in forums?

Post by yosuke_ »

Hi!
Well, I can't figure out how to make this. In this forum are tons of posts and thay all arent listed from firstone to lastone, thay are splited in pages!! As far as I understand it works like this:
Posts: 20
I want to display on each page 10 posts, so it goes like this:
20/10 = 2pages
but If posts are 23 then
23/10 = 4.6 pages
how to make it?? Please give me some tips or coe snipets! Thank You!!!
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

you are referring to pagination
pagination tutorial
yosuke_
Forum Commoner
Posts: 64
Joined: Tue Apr 13, 2004 12:29 pm

Post by yosuke_ »

THANK YOU VERY MUCH!!!
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

no problem

good luck :)
Post Reply