query modification problem with checkboxes
Posted: Mon Nov 01, 2004 5:58 pm
I am running a restaurant search engine. Users can search by cuisine, city, etc. I would like to incorporate an advanced search where the users could modify the search by amenities, such as valet parking, waterfront view, etc. My current code for one search looks like this:
I also have a tblRestaurantFeatures, and a tblFeatureType. tblRestaurantFeatures has restID, and featureID, while tblFeatureType has featureID and featureName. I am looking for the proper code to add in check boxes that the search would be modified with. Can anyone help me out on this??? 
Code: Select all
<?php
$db_name="";
$table_name="tblCuisine";
include'';
$db=mysql_select_db($db_name,$conn) or die(mysql_error());
$sql="SELECT cuisineID, cuisineName FROM $table_name order by cuisineName";
$result=mysql_query($sql,$conn)or die(mysql_error());
$num=mysql_num_rows($result);
if ($num < 1) {
print "<p><em>Sorry! No results.</em></p>";
} else {
print "
<form method="POST" ACTION="results_page.php">
<p><strong>Restaurant Cuisine:<br><br></strong>
<select name="primaryCuisine">";
/* START WHILE LOOP */
while ($row = mysql_fetch_array($result)) {
$cuisineID = $rowїcuisineID];
$cuisineName = $rowїcuisineName];
print"<br><option value="$cuisineID">$cuisineName</option>";
}
/* END WHILE LOOP */
print "
<input type="hidden" name="searchValue" value="searchCuisine">
</select></p><br>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Select This Type">
</form>";
}
?>