I need a little modification. I want to show 10 results per page. This script shows all the rows from my database. How can I change it so it only shows the first 10 then 11-20, and so on. I want it to have also a link in the bottom like this: page"1 2 3 4 5...10" so the client can go to those results.
NOTE: i just want this script to run on one page and not run on different page when i select a different page number
<?
$result = mysql_query("select * from plant_info where $category = '$spec' order by item")
while ($row = mysql_fetch_array($result, MYSQL_BOTH))
{
//echo "THIS IS ROW ".$row;
echo '<tr><td width="15%">';
if ($row["image"] != ""){
echo '<img width="100" src="photos/thumbs/' . $row["image"] . '">';
}else{
echo '<img width="100" src="images/nophoto.gif">';
}
echo '</td><td valign="top">';
echo '<a href="details.php?id=' . $row["id"] .'&category=' . $category . '&spec=' . $spec . '"><font face="arial" size="3"><b>' . $row["item"] . '</b></font></a>';
echo '<br>Summary : <i>' . $row["difficulty"] .'</i>';
echo '</td></tr>';
}
echo "</table>";
echo "</body>";
?>