Okay I have been playing with this for ages now and it doesnt appear to work correctly, I have it to show 40 entries per page and it works correct on page 1 showing results 0-39, however on page 2 it shows results 40-84 and I have no idea why its doing it, here is the code I am using... please bare in mind that what im talking about above is not using the $cat variable. here is the code: [code] <? if(isset($_GET['cat'])) { $cat = $_GET['cat']; $sql = "SELECT * FROM poems WHERE type='$cat'"; } else { $sql = "SELECT * FROM poems"; } $res = mysql_query($sql); $numperpage = 40; $num = mysql_num_rows($res); $numpages1 = ($num / $numperpage); $numpages = ceil($numpages1); if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $min = ($page * $numperpage - $numperpage); $max = ($page * $numperpage - 1); if(isset($_GET['cat'])) { $q = "SELECT * FROM poems WHERE type='$cat' LIMIT $min,$max"; } else { $q = "SELECT * FROM poems LIMIT $min,$max"; } $result = mysql_query($q); if($page == 1) { $count = 1; } else { $count = $min; } while($row = mysql_fetch_array($result)) { $id = $row["id"]; $title = $row["title"]; echo "<tr><td><div align=\"center\">$count</div></td><td> <a href=\"viewpoem.php?id=$id\">$title</a></td></tr>"; $count++; } echo '</table>'; //pagination $r = 1; echo "<br><br><b>Jump To Page:<br>| "; while($r <= $numpages) { if(isset($_GET['cat'])) { if($r == $page) { echo "<span class=\"paginationred\">[$r]</span>  "; } if($r != $page) { echo "<a href=\"$PHPSELF?cat=$cat&page=$r\" class=\"pagination\">$r</a> "; } } else { if($r == $page) { echo "<span class=\"paginationred\">[$r]</span> "; } if($r != $page) { echo "<a href=\"$PHPSELF?page=$r\" class=\"pagination\">$r</a> "; } } // end if $r++; } // end loop echo '|'; ?> [/code] Any help is appreciated, thanks