Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Dynamic Dropdown Menu

Options
  • 13-03-2009 2:44pm
    #1
    Registered Users Posts: 13,746 ✭✭✭✭


    Hi, I am trying to make one of these.
    I have managed to get a few drop down ones but some are just coming up in plain text.

    here is the code I am using, I have also attached a document of what it looks like, youl see from that, that 2 are not in drop down menus.

    Can anyone help?

    thanks

    <?
    ...
    mysql cnx code
    ...

    $sql="SELECT id, thing FROM table";
    $result=mysql_query($sql);

    $options="";

    while ($row=mysql_fetch_array($result))
    {

    $id=$row["id"];
    $thing=$row["thing"];

    }
    ?>


    <SELECT NAME=thing>
    <OPTION VALUE=0>Course Code

    <SELECT NAME=thing>
    <OPTION VALUE=0>Course Year


    <SELECT NAME=thing>
    <OPTION VALUE=0>Semester

    <SELECT NAME=thing>
    <OPTION VALUE=0>Subject Name

    <SELECT NAME=thing>
    <OPTION VALUE=0>Exam Year

    <?=$options?>
    </SELECT>


Comments

  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Your HTML looks completely wrong - you have selects nested in selects etc.

    What exactly are you trying to do?


  • Registered Users Posts: 13,746 ✭✭✭✭Misticles


    ha Im completely new to this, I got it working anyways. Its getting the info from the database now.


Advertisement