Codenames Posted November 6, 2013 Share Posted November 6, 2013 in trying to display Prevous/Next like the one on this site like this << prev next >> and not display like this << prev 1 2 3 4 5 next >> anyone who can help me with this Thanks, my code <?php $sql1 = "SELECT COUNT(*) FROM addetails "; $rs1 = mysql_query($sql1,$con); $row1 = mysql_fetch_row($rs1); $total = $row1[0]; $tp = ceil($total/5); for($i = 1; $i <= $tp; $i++) { ?> <?php echo " <a href='Search.php?page=".$i."'><strong>".$i."</strong></a>"; } ?> Quote Link to comment Share on other sites More sharing options...
.josh Posted November 6, 2013 Share Posted November 6, 2013 Pick a pagination tut that has the non-numerical links and just remove the loop that outputs the linked numbers. For example, on this really old pagination tut I made: http://www.phpfreaks.com/tutorial/basic-pagination just remove the code block with this comment header: // loop to show links to range of pages around current page Though as a sidenote, and this is totally IMO.. I hate pagination links that don't have the full controls. 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.