I can't see anything wrong with your code?  What exactly is the problem?
Aren't the values, from the select statement printing out on your web page
or something?  Are you sure you provided the right code?

----- Original Message -----
From: "Stinsman, Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 23:17
Subject: mySQL/php query help


> can anyone figure out why the following code works fine when both select
> variables = "ALL" and also when only 1 of the 2 ="ALL" but NOT when BOTH
> select variables equal something other than "ALL"?
>
> here is the code:
>
> What area of the city would you like to dine in?
> <?php
> $db=mysql_connect("localhost", "******", "*********");
>
> mysql_select_db("*******", $db) OR DIE ("died at connect");
>
> $query = "SELECT DISTINCT Restaurant.Area ";
> $query .= "FROM Restaurant ";
> $query .= "ORDER BY Restaurant.Area ASC ";
> $mysql_result=mysql_query($query, $db) OR DIE ("died at query");
>
> $select="<select name=\"AreaTemp\">\n";
> $select.="<option value=\"ALL\">ALL</option>\n";
> while(list($AreaTemp)=mysql_fetch_array($mysql_result)) {
>
> $select.="<option value=\"$AreaTemp\">$AreaTemp</option>\n";
>
> }
>
> $select.="</select>";
> echo "$select";
>           ?>
>           <br>
>           What type of cuisine do you feel like?
>
>
> <?php
> $query = "SELECT DISTINCT Restaurant.Cuisine ";
> $query .= "FROM Restaurant ";
> $query .= "ORDER BY Restaurant.Cuisine ASC ";
> $mysql_result=mysql_query($query, $db) OR DIE ("died at query");
>
> $select="<select name=\"CuisineTemp\">\n";
> $select.="<option value=\"ALL\">ALL</option>\n";
> while(list($CuisineTemp)=mysql_fetch_array($mysql_result)) {
>
> $select.="<option
> value=\"$CuisineTemp\">$CuisineTemp</option>\n";
>
> }
>
> $select.="</select>";
> echo "$select";
>
> ?>
>
>           <br>
>
>           <input type ="submit" value="Go!" name="submit">
>           <input type="RESET" value="Clear" name="RESET">
>
> Scott Stinsman
> Academic Coordinator
> General Internal Medicine
> 1215 Blockley Hall
> 423 Guardian Drive
> Philadelphia, PA  19104-6021
> (phone)  215-662-7623
> (fax)  215-349-5091
> (email)  [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to