Why don't you just read a tutorial, like anyone else?
Check out http://hotwired.lycos.com/webmonkey/99/21/index2a.html.
But your lucky, i wrote you the code, anyway. Maybe there's a bug in it (cause i havn't checkt it). replace all words beginning with 'your_' with your values. have fun
<form method="post" action="<?php echo $PHP_SELF?>">
<input type="Text" name="search"><br>
<input type="Submit" name="submit" value=" submit ">
</form>
<?php
if($submit)
{
$db = mysql_connect("localhost", "your_username", "your_passwort_optionally");
mysql_select_db("your_database_name",$db);
$result = mysql_query("SELECT * FROM your_tablename WHERE zip='$search'",$db);
if ($myrow = mysql_fetch_array($result))
{
echo "<table border=1>\n";
echo "<tr><td>postcode</td><td>name</td><td>address</td><td>town</td><td>tel</td></tr>\n";
do
{
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $myrow["postcode"], $myrow["name"], $myrow["address"], $myrow["town"], $myrow["tel"]);
}
while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
}
else
{
echo "ERROR: no addresses were found!";
}
}
?>