| Code: |
<form action="search.php" method="post">
<fieldset>
<legend><h3>Please select an area of Central Virginia where you wish to find an Optometrist</h3>
<p>
<input type="checkbox" name="locids[]" value="8">
Richmond City/Fan Area<br>
<input type="checkbox" name="locids[]" value="1">
Far West End (Short Pump, Goochland, etc.)<br>
<input type="checkbox" name="locids[]" value="2">
Near West End (Willow Lawn, Parham Rd.)<br>
<input type="checkbox" name="locids[]" value="3">
North (Ashland, Hanover, etc.) <br>
<input type="checkbox" name="locids[]" value="4">
South
(Midlothian, Chester, etc.) <br>
<input type="checkbox" name="locids[]" value="5">
East End <br>
<input type="checkbox" name="locids[]" value="6">
Colonial Heights/Petersburg/Hopewell<br>
<input type="checkbox" name="locids[]" value="7">
Mineral/Louisa<br>
</p>
</fieldset>
<input value="Search Doctors" type="submit" >
</form> |
| Code: |
<?php
require_once("mainfile.php");
$numElements = count($locids);
for($counter=0; $counter < $numElements; $counter++)
{
value
if($locations == "") {
$locations = $locids[$counter];
}
else {
$locations = $locations.",".$locids[$counter];
}
}
$result = $db->sql_query("select u.name, o.offname, o.add1, o.add2, o.city, o.state, o.zip, o.phone, o.fax FROM nuke_users u, offices o, locationcodes l WHERE u.user_id = o.userid and o.locationid = l.locationid AND l.locationid IN ($locations)");
= '$area'");
("SELECT *users_office3* FROM nuke_users IF users_location3 = '$area'");
("SELECT *users_office4* FROM nuke_users IF users_location4 = '$area'");
("SELECT *users_office5* FROM nuke_users IF users_location5 = '$area'"); */
$num = $db->sql_numrows($result);
while($row=mysql_fetch_assoc($result)) {
echo "<center>$row[name], $row[offname], $row[add1], $row[add2], $row[city], $row[state], $row[zip], $row[phone], $row[fax]</center> ";
}
[user_office5]
mysql_free_result($result);
exit;
?> |