forumnz Posted February 1, 2008 Share Posted February 1, 2008 Why isn't this working? It just displays 10 listings, but when I add ?page=1 or 2 or 3 etc, I get the same listings. Here is the snippet: <?php $page = $_GET['page']; if($page == '' || $page == '0'); { $page = '1'; } $rpage = $page - '1'; if($rpage == '0') { $p = '0'; } else { $p = ($rpage * '10') - '10'; } $sql = ("SELECT * FROM fflists WHERE $sid='$cat' AND active='1' ORDER BY $obt $uodt LIMIT $p,10") or die (mysql_error()); $result = mysql_query($sql) or die(mysql_error()); $numr = mysql_num_rows($result); ?> Quote Link to comment https://forums.phpfreaks.com/topic/88825-pagination/ 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.