Combo selected item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • savanm
    New Member
    • Oct 2006
    • 85

    Combo selected item

    Hi guys

    I have one doubt

    I already load a field(username) from the databse to combo

    The combobox contains list of username.

    And i have two text box in the form

    If am select the combo(username) means

    it wl display the username in textbox1

    and password in textbox2 from the databbse

    Any one please help me..

    Thanks

    Navas.M
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    I do not really understand what you want. Please show the code you have developed and we'll have a look at the problem/question.

    Do not forget to show any code between code or php tags!!

    Ronald :cool:

    Comment

    • savanm
      New Member
      • Oct 2006
      • 85

      #3
      Hi Ronald

      This is my code

      echo "<select>\n ";
      echo("<option value='Select'> Select</option>\n");
      $query = "select user from login";
      $res = mysql_query($qu ery);
      while($row = mysql_fetch_arr ay($res)) {
      echo("<option value='$row[user]'>$row[user]</option>\n");
      }
      mysql_free_resu lt($res);
      echo "</select>";
      ?>

      For using the above code am load the combobox

      It contains the list of username

      For example database is like that

      user Password

      ronald ronald
      navas navasm

      combobox contains
      ronald
      navas

      wn i click ronald from combobox
      the details of the user ronald that is password ronald

      is show in a textbox

      Please try to understand my need

      Thanks
      Navas.M

      Comment

      Working...