Hi
I wanted know how can I make the numbers count to continue when clicked on page 2, page 3 and so on..
Lets say I am showing top ten users with 10 users per page and it starts out
1. User1
2. User2
3. User3
// and so on
and then you click on page 2 and it should continue counting from 10 so that page two shows
11. User11
12. user12
// and so on with any more pages I might have.
BUT instead my code starts out the count from 1 on any next page you click.
here is my code
Anyone with help thank youCode:$entries_per_page = "10"; if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $total_pages = ceil($count / $entries_per_page); $offset = ($page - 1) * $entries_per_page; $ssi = mysql_query("SELECT blahh blahh DESC LIMIT $offset, $entries_per_page"); $ i = 0; while ($row = mysql_fetch_assoc($ssi)) { $i++; //this is where it all goes }



Reply With Quote


Bookmarks