I have the following code where users can select what size apartment and what location, but how do I write the query that selects the variables?
here is the form:
<p><table><tr><td>
<FORM method="post" ENCTYPE="MULTIPART/FORM-DATA" action="/results.php">
<p>Select how many bedrooms you want in your apartment.</p>
<table cellpadding="5" cellspacing="5"><tr><td valign="top">
<INPUT TYPE="radio" NAME="type" VALUE="single"> Studio<br>
<INPUT TYPE="radio" NAME="type" VALUE="1 Bedroom"> 1 Bedroom<br>
<INPUT TYPE="radio" NAME="type" VALUE="2 Bedroom"> 2 Bedroom <br>
<INPUT TYPE="radio" NAME="type" VALUE="3 Bedroom"> 3 Bedroom<br></td><td valign="top">
<INPUT TYPE="radio" NAME="type" VALUE="4 Bedroom"> 4 Bedroom<br>
<INPUT TYPE="radio" NAME="type" VALUE="loft"> loft<br>
<INPUT TYPE="radio" NAME="type" VALUE="storage"> storage<br></td></tr></table>
</td></tr><tr><td>
<p>Select an area to search.</p><table cellpadding="5" cellspacing="5"><tr><td>
<INPUT TYPE="radio" NAME="zone" VALUE="West Los Angeles"> </td><td>West Los Angeles (Beverly Hills, Brentwood / Bel Air, Century City, Culver City, La Cienega, LAX, Malibu, Mar Vista, Marina Del Rey, Pacific Palisades, Pico Fairfax, Santa Monica, Topanga Canyon, Venice, West Hollywood, West Los Angeles, Westwood)
</td></tr><tr><td>
<INPUT TYPE="radio" NAME="zone" VALUE="South Los Angeles"></td><td>South Los Angeles (Bell Gardens, Bellflower, Cerritos, Compton, Downey, Hawaiian Gardens, Hawthorne, Huntington Park, La Mirada, Lakewood, Lynwood / South Gate, Norwalk, Paramount, Pico Rivera, Santa Fe Springs, Whittier, Wilmington)</td></tr><tr><td>
<INPUT TYPE="radio" NAME="zone" VALUE="South Bay"></td><td>South Bay (Belmont Shore, Carson, El Segundo, Harbor City / Wilmington, Hawthorne / Gardena, Hermosa Beach, Long Beach, Manhattan Beach, Palos Verdes, Redondo Beach, San Pedro, Torrance) </td></tr><tr><td>
<INPUT TYPE="radio" NAME="zone" VALUE="San Gabriel"></td><td>San Gabriel / Pasadena (Alhambra, Arcadia / Monrovia, Bradbury, Covina, Diamond Bar, Glendora, Hacienda Heights, Industry, Irwindale, La Habra Heights, Pasadena / Altadena, Pomona, San Dimas / Claremont, San Gabriel, South Pasadena)</td></tr>
<tr><td><input type="radio" name="zone" value="San Fernando Valley"></td><td>San Fernando Valley (Agoura Hills, Burbank, Calabasas, Canoga Park, Chatsworth, Eagle Rock, Encino, Glendale, Granada Hills, Montrose, North Hollywood, Northridge, Panorama City, Reseda, San Fernando / Pacoima, Sherman Oaks, Studio City, Sunland / Tujunga, SunValley, Tarzana, Toluca / Universal City, Valley Village, Van Nuys, Woodland Hills) </td></tr>
<tr><td><input type="radio" name="zone" value="North Central Los Angeles"></td><td>North Central Los Angeles (Cahuenga, Echo Park, Glassel Park, Highland Park, Hollywood, Hollywood Hills, Los Feliz, Melrose, Monterey Hills, Silver Lake, Sunset) </td></tr>
<tr><td><input type="radio" name="zone" value="Central Los Angeles"></td><td>Central Los Angeles (Chinatown, Crenshaw, Downtown Los Angeles, East Los Angeles, Hancock Park, Inglewood, Jefferson / La Brea, Ladera Heights, Lafayette / MacArthur, Mid Town, Montebello / Commerce, Olympic / Miracle Mile, South Central, University Park, Wilshire) </td></tr><tr>
<td><input type="radio" name="zone" value="Antelope Valley"></td><td>Antelope Valley (Acton, Lancaster & Vicinity, Leona Valley, Palmdale & Vicinity)</td></tr>
<tr><td><input type="radio" name="zone" value="Ventura Valley"></td><td>Ventura County (Camarillo, Moorpark, Newbury Park, Ojai, Oxnard, Simi Valley, Thousand Oaks, Ventura) </td></tr> </table>
<br><INPUT TYPE="submit"></FORM>