Simon,
Thanks for your help.
I played around with it a little bit, but still must be missing something.
My form looks like this:
<form method="post" action="sch.php">
<input type="text" name="zipsearch" size="25">
<input type="submit" value="Begin Searching!!">
</form>
My database has basic fields:
name
address
city
state
zip
I believe I have the connection info correct, but am still stuck.
My sch.php looks like this:
<?php
//connect to database
$dbh = mysql_connect("localhost","nomo","nomo");
mysql_select_db("nomo");
//run the SQL statement
$sql="select ZIP from 99MC where ZIP = '".$zipsearch."'";
$result=mysql_query($sql,$dbh);
//extract and display the results
$row_count=mysql_num_rows($result);
for ($i=0;$i<$row_count;$i++){
$fetched_row=mysql_fetch_row($result);
echo $fetched_row[0];
}
Thanks for any help.
dan