AviNahum Posted December 10, 2008 Share Posted December 10, 2008 hey... (sorry for poor English, i from Israel) so made a reply system for each page in web. but i got a problem... there is more then 300 replies in database... it's shows the replies with while loop... and it shows all replies in 1 page... i want it makes new page after 15 replies... i mean it shows oy 15 replies for each page. how i can do it? thanks! i forgot... that the script that show the replies: $select = "SELECT * FROM web_downloads_replies WHERE reply_in='$download_id'"; $result = mysql_query($select , $DB); while ($row = mysql_fetch_array($result)) { $download_reply = array( 'id' => $row['id'], 'date' => $row['date'], 'name' => $row['name'], 'reply_in' => $row['reply_in'], 'content' => $row['content'] ); echo "<div><div align='right'>מאת: <font color='blue'>", $download_reply['name'] ,"</font></div><div align='left'><font id='download_date'>(", $download_reply['date'] ,")</font></div></div> <div width='1%'><font id='reply'>", $download_reply['content'] ,"</font></div>"; echo "<hr><br>"; } Quote Link to comment https://forums.phpfreaks.com/topic/136380-reply-system-to-split-it-to-pages/ Share on other sites More sharing options...
premiso Posted December 10, 2008 Share Posted December 10, 2008 Pagination is what you are after. http://www.phpfreaks.com/tutorial/basic-pagination Great tutorial right there. Quote Link to comment https://forums.phpfreaks.com/topic/136380-reply-system-to-split-it-to-pages/#findComment-711599 Share on other sites More sharing options...
gevans Posted December 10, 2008 Share Posted December 10, 2008 Have you ever looked at pagination? There's a very good pagination tutorial here at phpfreaks. It may be easier for you to look at this and understand it rather than use trying to change all your code for you Quote Link to comment https://forums.phpfreaks.com/topic/136380-reply-system-to-split-it-to-pages/#findComment-711602 Share on other sites More sharing options...
AviNahum Posted December 10, 2008 Author Share Posted December 10, 2008 thanks... it's works... Quote Link to comment https://forums.phpfreaks.com/topic/136380-reply-system-to-split-it-to-pages/#findComment-711698 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.