Ok read that and understood some of it but zoom over the head. I started teaching myself about a week ago to get through a project, so my understanding to the point is very basic and below is what I have so far.
What I want to do is if there are say 65 results, display the first 10 and then have links that are generated in the code that go to the next set and so on.
So I'm thinking like; if num_results > 10 then
anyway here's what I got;
<!-- php starts here -->
<?php
trim($searchterm);
if (!$searchtype || !$searchterm)
{
echo "<p align=center><b>You have not entered search details. Please go back and try again.</b></p>";
exit;
}
/* Connecting, selecting database */
@ $db = mysql_connect("sqldb.globalhosting.com", "amplifi", "hisword"

or die("Could not connect"

;
mysql_select_db("churches"

or die("Could not select database"

;
/* Performing SQL query */
$query = "SELECT * FROM church WHERE ".$searchtype." LIKE '%".$searchterm."%' order by 'name' asc";
$result = mysql_query($query) or die("Query failed"

;
$num_results = mysql_num_rows($result);
print "<p><b>Your search produced ".$num_results." matches.</b></p>";
/* Printing results in HTML */
print "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" width=\"500\" align=\"center\">\n";
print "<tr>\n";
print "<td bgcolor=#0099CC colspan=\"3\" width=\"50%\"><p><b>Organization</b></p></td>\n";
print "<td bgcolor=#0099CC colspan=\"5\" align=\"right\"><p><b>Information</b></p></td>\n";
print "</tr>\n";
while ($row = mysql_fetch_assoc($result)) {
print "<tr>\n";
printf("<td colspan=\"3\"><p>%s<br> %s<br> %s</td><td align=\"right\" colspan=\"5\"><p>%s<br> %s, %s, %s<br> %s</td>\n", $row['Name'], $row['Pastor'], $row['Denomination'], $row['Address'], $row['City'], $row['State'], $row['Zip'], $row['Phone']);
print "\t</tr>\n";
}
print "</table>\n";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($db);
?>
<!-- php ends here -->