I have a online horse sim game that I've been working on since Early June. I'm trying to figure out how to display search results. I have the wildcard already, but, some search results find more than 1,000 results. That would be a pain to load with slow Internet connections. I would like to select information from a database, and have 30 on a page.
Code: Select all
<?php
$result = mysql_query("SELECT hid, owner from horses WHERE name='%$horsename1%' limit 30") or die ('error on english reg');
$numresults = mysql_num_rows($result);
while ($row = mysql_fetch_array($result))
{
$hid = $row['hid'];
$owner = $row['owner'];
echo "<font color='white'><a href=horsepage.php?hid=$hid>$horsename1</a></b></u></i></font><br>";
}
?>
How would I make it, if numresults is above 30, have it so it refreshes that page, but shows the next 30 results?
Thanks,

Dani