rendered paste body<body>
<form action="?" method="post">
Name: <input type="text" name="dude" />
<input type="submit" value="Search" name="find" />
</form>
<form action="?" method="post">
ID: <input type="text" name="id" />
<input type="submit" value="Search" name="find" />
</form>
</body>
<?php
if (isset($_POST['find']))
{
$id=addslashes($_POST['id']); }
$dude=addslashes($_POST['dude']);
$id=addslashes($_POST['id']);
$result=mysql_query("SELECT * FROM `houses` WHERE `name` LIKE '%".$dude."%' OR `id` LIKE '%".$id."%'");
$total=mysql_num_rows($result);
if ($total == 0){
exit("No users found");
?>
<br><table cellpadding="2" cellspacing="0" rules="none" width="30%">
<tr><td align="center"><b>Users found (<? echo $total; ?>)</b></td></tr>
<tr><td bgcolor="black" height="2"></td></tr>
<tr><td><b>Nick Or Password</b></td></tr>
}
<?
}
while($a=mysql_fetch_object($result)){
echo "<tr><td><a href='houses.php?view=$a->id'>$a->name</a></td>";
echo "<td><a href='houses.php?view=$a->id'>$a->id</a></td></tr>";
echo "<img src='".$a->pic."' border='0'>";
}
?>
</table>