several pages for search result

hello,

i have made the fallowing code that searches through my mysql database in oder to find something looks like the query that the user is looking for.
i was just wondering what should i do in order to make a second page if the results are more than 25.
in other words, if there are more than 25 row i want to have a second page and if its more than 50 i want a third page and so on.
[php]$searchquery=$_POST[‘searchquery’];
$sql = “SELECT * FROM users WHERE title ILKE '%” . $letter . “%’”;
$result = mysql_query($sql);
$numrows=mysql_num_rows($result);
echo “

” .$numrows . " results found for " . $letter . “

”;
if ($numrows != 0)
{
?>






<? while($row=mysql_fetch_array($result)){ ?>
											<tr>
											<td style="width: 95px">
											<img src="CardsPictures/<? echo $row['cardid']; ?>.jpg" width="71" height="96" alt="Front Picture"/></td>
											<td><a href="http://www.SportsCardMovers.com/show_card.php?cardid=<? echo $row['cardid']; ?>"><? echo $row['title']; ?></a></td>
											<td><? echo $row['bookprice']?></td>
											<td><? echo $row['price']?></td>
<? } ?>
											</tr>
											</table>
<? } else echo "Please Use another Query and Search Again"; ?>[/php]

thank you :slight_smile:

image Description Book Price Asked Price
Sponsor our Newsletter | Privacy Policy | Terms of Service