desithugg Posted August 10, 2006 Share Posted August 10, 2006 umm heres what i ahve i use a query to show my members list and i have a limit of 15 on a page but for the next page i use $start and 15 and increases by 15 each time u click next page but is there a way i can make it so it counts how many members there are any show that many page linkslike instead ofNext page which leads to next 15 i want it to show1 2 3 4 5 6 7 8 9 10 and so on Quote Link to comment Share on other sites More sharing options...
Jocka Posted August 11, 2006 Share Posted August 11, 2006 you can use something like this[code]$count = 15; // number of rows on a page$result = mysql_query("SELECT * FROM table1", $link);$num_rows = mysql_num_rows($result);$math = $num_rows / $count;$links = '';$page_count = 15;for($i = 1; $i <= $math; $i++){ $links .= "<a href='thispage.php?page=" . $page_count . "'>" . $i . "</a>"; $page_count = $page_count + 15;}[/code]You echo $links when it's done and there that goes.. I'm not sure how you have everything set up so I just threw a few things together there.something like that should work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.