Okay, here is the starting point of the form from http://www.schylling.com/store_finder.php
<form name="search" action="spage2.php" method="post">
<p style="margin-top: -1; margin-bottom: -1">
<font face="Verdana"><b><font size="2">Search by Zip:</font></b></font><font size="2">
</font>
<input type="text" name="zipCode" size="20"> <b><font size="2" face="Verdana">(example: 01922)
</font></b>
</p>
<p style="margin-top: -1; margin-bottom: -1">
<br>
<font face="Verdana" size="2"><b>Search by State:
</b></font> <input type="text" name="state" size="20">
<input type="submit" size="20"> <b> <font size="2" face="Verdana">(example: NY for New York) </font>
</b>
<br>
</p>
</p>
</form>
Here is the code from the second page:
</html>
<?
// Page two, search and display
$connect = mysql_connect("XXXX", "XXXX", "XXXX");
$db = mysql_select_db("schylling_storelist", $connect);
$sql = "SELECT *
FROM STOREDATA
WHERE State = '".$POST['state']."'
OR ZIP_Code = '".$POST['zipCode']."'";
$result = mysql_query($sql);
$rows = mysql_num_rows($result);
if($rows > 0) {
echo "<p><center></p>
<table border=\"1\">
<th align=\"center\newstyle\">Name</th>
<th align=\"center\">City</th>
<th align=\"center\">State</th>
<th align=\"center\">Sales Phone</th>";
while($row=mysql_fetch_array($result)) {
echo "<tr><center>
<td align=\"center\" class=\"newstyle\">".$row['Name']."</td>
<td align=\"center\" class=\"newstyle\">".$row['City']."</td>
<td align=\"center\" class=\"newstyle\">".$row['State']."</td>
<td align=\"center\" class=\"newstyle\">".$row['Sales_Phone']."</td>
</tr>";
}
}
else {
echo "No results found";
}
mysql_close($connect); ;
As you can see this is really basic no frills.