After trial, error, 2 days reading about PHP and some fine Single Malt,
have finally created a search from a database with multiple criteria as
below.
NOTE comments on tidying the code up are welcomed.
BUT.... if I want to split the search into groups of 10 and then (like
Google) prompt for page 2 of 10, 3 of 10 etc.
Anyone know of any tutorials on this?
Many thanks
Alec
<?php
$result = @mysql_query ("SELECT name, townname, town, townid, photo
FROM site01_towns, site01_details WHERE townname='$town search' AND
town=townid AND code='sleep'");
while ($row = mysql_fetch_arr ay($result))
{
$photoname = $row['photo'];
$company = $row['name'];
?>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400"
height="95">
<tr>
<td valign="top"><? php echo '<p>' . $row['name'] . '</p>'; ?></td>
<td valign="middle" width="140"><im g src="images/<?php print
$photoname; ?>" border="0"/></td>
</tr>
</table>
</center>
</div>
<?php
}
?>