I'm having a problem that I know is probably very simple to correct, but I can't seem to figure it out. Here's the problem:

I am trying to get a pagination script to work on my category page. I can get the categories I want, but if there are more than 10 items in the category it shows the link. When you select the link for the next 10 pages it just repeats what it already shows.

Here's my code - (I have an include config.php at the top of the page)
PHP Code:
<?php

if(!$start){
    
$start 1;
}
if(!
$limit){
    
$limit $perpage;
}
$end=($start+$limit);

$sql "SELECT * FROM greenhouses WHERE merchantsubcategory='$category'";
if(
mysql_num_rows(mysql_query($sql)) < 1){
echo 
"No Products In This Category";
}

$result mysql_query("SELECT Name,Description,Thumbnail,Link from greenhouses  ORDER by name ASC LIMIT $start$limit") or die (mysql_error());
while (
$row mysql_fetch_array($result))
{
include(
'product-display.php');
}
$prv = ($start-$limit);
$nxt = ($start+$limit);
if(
$prv 0){
$previous "";
}else {
$previous "<a href=\"category.php?merchantsubcategory=$cat2&start=$prv&limit=$limit\"><<< Previous $limit The Greenhouse Shop</a>";
}
if(
mysql_num_rows(mysql_query($sql)) < $nxt){
$next "";
}else {
$next "<a href=\"category.php?merchantsubcategory=$cat2&start=$nxt&limit=$limit\">Next $limit The Greenhouse Shop >>></a>";
}
if(
mysql_num_rows(mysql_query($sql)) > $limit){
echo 
"<P><table border=0 bordercolor=#000000 align=center width=90% bgcolor=#ffffff cellpadding=3 cellspacing=0><TR>
<TD align=center>
<b>
$previous</b> &nbsp; &nbsp; &nbsp; <b>$next</b>
</font></TR></TD></table><P>"
;

}

?>
If the category has more that 10 items this is the link it shows:
Next 10 The Greenhouse Shop >>>

If you hover over the link this is what it shows:
http://mysite.com/greenhouses/catego...rt=10&limit=10

I'm sure it's something simple, but I think I may be too simple to figure it out. I'd appreciate some help or suggestions.

Thanks,
Sharan