- People search hierarchially via drop-downs. So lets say we were using a map as an example. You'd select a state in the 1st drop-down. Then the county in the next drop down. Then the city in the next drop-down. Then the block, then the address.
- It needs to show what has been selected after it has been submitted, that way people won't forget what they have searched for.
TIA!
http://acscable.com/test/test.php
Code: Select all
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<select name="equipment_type">
<option value="junk">-------------------</option>
<option value="%">All Equipment Types</option>
<option value="E911">E911 Cables</option>
</select>
<select name="project">
<option value="junk">-------------------</option>
<option value="%">All Projects</option>
<option value="Ericsson">Ericsson</option>
</select>
<INPUT TYPE=SUBMIT VALUE="Submit">
<?
$username="acscable_client";
$password="cat7";
$database="acscable_tmobile";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="select * from tmobile where equipment_type like '".$_POST["equipment_type"]."' AND project like '".$_POST["project"]."'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num)
{
$region=mysql_result($result,$i,"region");
$manu_part_num=mysql_result($result,$i,"manu_part_num");
$acs_part_num=mysql_result($result,$i,"acs_part_num");
$equipment_type=mysql_result($result,$i,"equipment_type");
$project=mysql_result($result,$i,"project");
$description=mysql_result($result,$i,"description");
$picture=mysql_result($result,$i,"photo");
echo "<br><br><img src=\"$picture\"></img><br><br><b>Region:</b> $region <br><b>Manufacturer Part #:</b> $manu_part_num<br><b>ACS Part #:</b> $acs_part_num<br><b>Equipment Type</b>: $equipment_type<br><b>Project:</b> $project<br><b>Description:</b> $description<br><hr><br>";
$i++;
}
?>
</body>
</html>