Here is a basic search form, based off what i was using, need to create and/or change form action=searching.php
<html>
<body>
<form action="searching.php" method="GET">
Search For:
<br>
state:<input name="state" type="text" size="2"><br>
<input type=submit value="Search">
</form>
</body>
</html>
on the section where it says print $row just change and add which fields you want filled eg… direction change to first name and etc, just keep adding fields.
[php]
<?php
$con = mysql_connect("xxlocalhostxx","xxusernamexx","xxpasswordxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("xxDBNamexx", $con);
$RESULT = MYSQL_QUERY( "SELECT state FROM xxtablenamexx
WHERE 1 LIMIT 0, 30 "
$where = “”; if($_GET[“address”] != “”)
$where.= ($where == “”?"":" and “).”
address=’".addslashes
(urldecode($_GET[“address”]))."’";
if($_GET[“city”] != “”) $where.= ($where == “”?"":" and “).”
city=’".addslashes
(urldecode($_GET[“city”]))."’";
if($_GET[“street”] != “”) $where.= ($where == “”?"":" and “).”
street like ‘%".addslashes
(urldecode($_GET[“street”]))."%’";
$result = mysql_query(“SELECT * FROM dataentry “.($where==””?"":
(" WHERE “.$where)).” LIMIT 0, 30");
if ($row = mysql_fetch_array($result)) {
do {
print $row[“address”];
print (" “);
print $row[“direction”];
print (” “);
print $row[“street”];
print (” “);
print $row[“suffix”];
print (” “);
print $row[“city”];
print (” “);
print $row[“state”];
print (”
");
} while($row = mysql_fetch_array($result));
} else {print “No Results found, Try again later.”;}
?>
[/php]
i am a beginner so dont take what i say to be set in stone, but for all intents and purposes that should accomplish what you require, also on the html form you can create a drop down to prevent user input from being wrong, or add more fields to narrow selection.