Attempting to set up pagination. Data is being passed to page and being displayed in a dynamic table (Adjusts based upon the number of records to display.). Table row colors alternate; gray - white - gray. In addition, the <thead> is set up to allow for ordering of records. Now I want to add pagination; limiting the number of displayed rows to 20. Needing a good tutorial. Here's what I have so far: [code] <?php session_start; error_reporting(E_ALL | 'E_STRICT'); $db = mysql_connect("localhost", "root", ""); mysql_select_db("newcourse",$db); $result = mysql_query("SELECT * FROM proposals ORDER by Records DESC",$db); //let's get the number of rows in our result so we can use it in a for loop $numofrows = mysql_num_rows($result); //Table formatting and sorting buttons echo " <b>Courses you have submitted.</b> <TABLE BORDER=0 width='631' cellpadding=4 cellspacing=0 bgcolor='#FFFFFF'> <thead bgcolor='lightyellow'> <TR><TH><a title=\"Organize by course name\" href=\"\" onclick=\"this.blur(); return sortTable('offTblBdy', 0, true);\"><B>Course title</B></a></TH> <TH><a title=\"Organize by course number\" href=\"\" onclick=\"this.blur(); return sortTable('offTblBdy', 1, true);\"><B>Course number</B></a></TH><TH></TH></TR> </thead> <TFOOT> <TR bgcolor='lightyellow'> <Td><img src='spacer.jpg'></Td> <Td><img src='spacer.jpg'></Td> <Td><img src='spacer.jpg'></Td> </Tr> </TFOOT>"; // coloring every other row echo "<tbody id=\"offTblBdy\">"; for($c = 0; $c < $numofrows; $c++) { $myrow = mysql_fetch_array($result); //get a row from our result set if($c % 2) { //this means if there is a remainder echo "<TR class=\"alternateRow\">"; } else { //if there isn't a remainder we will do the else echo "<TR>"; } echo "<TD>".$myrow['CourseTitle']."</TD> <TD><center>".$myrow['CourseNumber']."</center></TD>"; echo "<TD width='170'> <a title='Edit record' style='text-decoration: none' href=\"addedit.php?Records=".$myrow['Records']."\">Edit</a> | <a title='Create PDF' style='text-decoration: none' href=\"PDFgen.php?Records=".$myrow['Records']."\">PDF </a> | <a title='Submit for review' style='text-decoration: none' href=\"EmailComment.php?Records=".$myrow['Records']."\">Submit </a> | <a title='Delete record' style='text-decoration: none' href=\"delete.php?Records=".$myrow['Records']."\"> Delete</a>"; //<a onmousedown='textSWAP()' id='textSubmitted' style='text-decoration: none' href=\"javascript: textSWAP('textSubmitted','Submitted');\">Submit </a> | echo "</TD>"; echo "</TR>"; } echo "</tbody>"; //now let's close the table and be done with it echo "</TABLE>\n"; // Close DB connection mysql_close($db); $Binary="0"; ?> [/code]