SUNIL16 Posted September 13, 2008 Share Posted September 13, 2008 Hi All, I made forum using php, it is working fine. but alll the post showing in one page only i want only 10 post in one page and i want to give link to next page for next 10 like that how to do that i am not getting.. here is how i am retrieving from database <table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td width="6%" align="center" bgcolor="#E6E6E6"><strong>#</strong></td> <td width="53%" align="center" bgcolor="#E6E6E6"><strong>Topic</strong></td> <td width="15%" align="center" bgcolor="#E6E6E6"><strong>Views</strong></td> <td width="13%" align="center" bgcolor="#E6E6E6"><strong>Replies</strong></td> <td width="13%" align="center" bgcolor="#E6E6E6"><strong>Author</strong></td> </tr> <?php while($row=mysql_fetch_array($result)){ // looping table row ?> <tr> <td bgcolor="#FFFFFF"><?php echo $row['id']; ?></td> <td bgcolor="#FFFFFF"><a href="view_topic.php?id=<?php echo $row['id']; ?>"><?php echo $row['topic']; ?></a><BR></td> <td align="center" bgcolor="#FFFFFF"><?php echo $row['view']; ?></td> <td align="center" bgcolor="#FFFFFF"><?php echo $row['reply']; ?></td> <td align="center" bgcolor="#FFFFFF"><?php echo $row['name']; ?><br/><?php echo $row['datetime']; ?></td> </tr> <?php // Exit looping } Link to comment https://forums.phpfreaks.com/topic/124030-hi-all-needed-logicsuggestion/ Share on other sites More sharing options...
GingerRobot Posted September 13, 2008 Share Posted September 13, 2008 That's called pagination. There's a very good tutorial on the subject here: http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/124030-hi-all-needed-logicsuggestion/#findComment-640346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.