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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Dynamic Dropdown Menu

  • 13-03-2009 1:44pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


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

    What exactly are you trying to do?


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


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


Advertisement