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 Link to comment https://forums.phpfreaks.com/topic/17188-next-page/ 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 Link to comment https://forums.phpfreaks.com/topic/17188-next-page/#findComment-72790 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.