<center><br><br><font face=arial size=2>Your search returned <b><?php echo
"$numrows";?></b> result(s)</center>
<?php
// begin to show results set
echo "<br><p>";
$count = 1 + $s ;
// now you can display the results returned
while ($row= mysql_fetch_array($result)) {
?>
<table border=1 bordercolor=#CCCCCC cellpadding=0 cellspacing=0 width=95%>
<tr bgcolor=#EEEEEE>
<td colspan=1 height=18> <b>ID #:</b> <?php echo
$row["id"];?></td><td colspan=3 height=18 align=right><b>Status:</b> <?php
echo $row["status"];?> </td>
</tr>
<tr>
<td align=left><p><font color=navy>May begin breeding as of <?php echo
$row["Year_Breed"];?> and must retire at <?php echo
$row["Year_Stop"];?></font><br><br>Vet: <?php echo
$row["vet"];?> <br>Shod: <?php echo $row["shod"];?> <br>Other:
Nil<br></td>
<td bgcolor=#FFFFFF width=64%><p><B><font size=2>
<?php echo $row["name"];?></font></B><br>
<?php echo $row["age"];?> <?php echo $row["color"];?> <?php echo
$row["breed"];?> <?php echo $row["gender"];?><br><br>
<b>Sire:</b> <?php echo $row["sire"];?> <?php echo
$row["sireid"];?><br>
<b>Dam:</b> <?php echo $row["dam"];?> <?php echo
$row["damid"];?><br><br>
<b>Discipline:</b><br><?php echo $row["disipline"];?><br><br>
<b>Owner:</b><br><?php echo $row["owner"];?></td>
</tr>
</table><br>
<?php
$count++ ;
}
$currPage = (($s/$limit) + 1);
// next we need to do the links to other results
if ($s>=1) { // bypass PREV link if s is 0
$prevs=($s-$limit);
print " <a
href=\"$PHP_SELF?s=$prevs&id=$var&name=$var2&age=$var3&color=$var4&breed=$var5&g
ender=$var6&status=$var7&owner=$var8&hs=$var9&vet=$var12\"><font face=verdana
size=1><<
Prev 15</font></a>  ";
}
// calculate number of pages needing links
$pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from
division
if ($numrows%$limit) {
// has remainder so add one page
$pages++;
}
// check to see if last page
if (!((($s+$limit)/$limit)==$pages) && $pages!=1) {
// not last page so give NEXT link
$news=$s+$limit;
echo " <a
href=\"$PHP_SELF?s=$news&id=$var&name=$var2&age=$var3&color=$var4&breed=$var5&ge
nder=$var6&status=$var7&owner=$var8&hs=$var9&vet=$var12\"><font face=verdana
size=1>Next 15 >></font></a>";
}
echo "</div>
</td>
</tr>
</table>
</body>
</html>";
exit;
}