Re: dropdown with two Sql query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't even understand what the first two code blocks are saying.  Looks 
like html, but I have never seen it like that.  I also don't see the two 
fields you specifically mention to start in your first select statement - 
some other garbled names are there instead.  Are you sure you've copied this 
correctly?

"asp kiddy" <aspkiddy@xxxxxxxxxxx> wrote in message 
news:SNT106-W94D445760F0A991221EBED6550@xxxxxxx...

In this table (tb_code_prmtn11_email) I have two field :
fld_email_id
 fld_name_email

It works here is a code


------------code-------------------->
<select name="email_adress_menu" id="email_adress_menu"  class="valid" 
onchange="submit()">
<?php
  echo "<option selected=\"selected\" value=''>Choose your name</option>";
  $req_email_adress_menu =   "SELECT DISTINCT id_email, fld_name_email, 
fld_adresse_email FROM $table_db_email ORDER BY fld_name_email ";
  $rep_email_adress_menu =  mysql_query($req_email_adress_menu, $cnx) or 
die( mysql_error() ) ;

  while($show_email_adress_menu = mysql_fetch_assoc($rep_email_adress_menu)) 
{
    echo '<option value="'.$show_email_adress_menu['id_email'].'"';
    //if($primes==$show_email_adress_menu['fld_name_email']){echo " 
selected";} //display to select an option!!!!!!!!!!!!!!!!
    echo '>'.$show_email_adress_menu['fld_name_email'].'  - 
'.$show_email_adress_menu['fld_adresse_email'].'</option>';
  }
?>
</select>
<-----end----code--------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux