Jump to content

Pagination


forumnz

Recommended Posts

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);
?>

Link to comment
https://forums.phpfreaks.com/topic/88825-pagination/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.