Hi, I am trying to paginate this to display just 4 results and use <Previous and Next> options for pagination. Please help. <div class="content"><p><?php // database information include "includes/config.php"; $query="SELECT * FROM students LIMIT"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $a=mysql_result($result,$i,"a"); $b=mysql_result($result,$i,"b"); $c=mysql_result($result,$i,"c"); $d=mysql_result($result,$i,"d"); print'<div> <div class="border"> <div class="sign"> '.$a.' '.$b.' </div> <div class="Content"><strong>Name: </strong>'.$c.'<br /> <strong>Price:</strong> '.$d.' <br /> </div> </div><br />'; $i++; } ?> Thanks in advance, Chris -- View this message in context: http://www.nabble.com/Trying-to-paginate-a-code-but-having-trouble.-tp15485452p15485452.html Sent from the Php - Database mailing list archive at Nabble.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php