سلام دوستان من کد زیر رو طبق مقاله ای که در بالا اومده استفاده کردم .
<?php
if(!isset($start)) $start = 0;
$query = "SELECT * FROM table LIMIT " . $start . ", 10";
//do database connection
$result = mysql_query($query); //you should do error checking
//display data
//this code was wrong, I did not have the second query.
// need another query to get the total amount of rows in our table
$query = "SELECT count(*) as count FROM table";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$numrows = $row['count'];
if($start > 0)
echo "<a href=" . $PHP_SELF . "?start=" . ($start - 10) . ">Previous</a><BR>n";
if($numrows > ($start + 10))
echo "<a href=" . $PHP_SELF . "?start=" . ($start + 10) . ">Next</a><BR>n";
?>
اما این چند خط کار نمیکنه :
if($start > 0)
echo "<a href=" . $PHP_SELF . "?start=" . ($start - 10) . ">Previous</a><BR>n";
if($numrows > ($start + 10))
echo "<a href=" . $PHP_SELF . "?start=" . ($start + 10) . ">Next</a><BR>n";
لطفا راهنمایی کنید