Dynamic drop-down list with array - question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jonnytansey2@hotmail.com

    Dynamic drop-down list with array - question

    Can anyone out there give me a pointer regarding creating a
    dynamically-generated drop-down list connected to an array?

    And is that question as clear as chocolate spread?

    Here's what I've got. I'm using PHP and MySQL database. I'm customizing
    some calendar software, and I want the user to fill in a form by
    selecting a title from a drop-down list, generated by my MySQL
    database. However, the program I'm customizing uses arrays, which is
    where I'm stumped.

    What do I need to add to this code to make the array of titles(eg
    "report writing" etc) come from my database, rather than the
    manually-entered values that you can see here.

    The field I want to pull from is called com_courses.tit le



    array (
    "coursetitl e",
    "Course Title:",
    $EXTRA_SELECTLI ST,

    array ("Report Writing", "Recruitmen t & Selection", "Presentati on
    Skills", "Essential Telephone Skills", "Time Managememt", "Customer
    Care", "Other"),
    0
    ),


    I hope it's not cheeky to ask this, and thank you sooooooooo much for
    answering.
    BTW I bought a book on Programming with PHP and MySQL, but it doesn't
    answer this question, so I'm not being lazy. Honest.

    Jonny

  • Joe Estock

    #2
    Re: Dynamic drop-down list with array - question

    jonnytansey2@ho tmail.com wrote:[color=blue]
    > Can anyone out there give me a pointer regarding creating a
    > dynamically-generated drop-down list connected to an array?
    >
    > And is that question as clear as chocolate spread?
    >
    > Here's what I've got. I'm using PHP and MySQL database. I'm customizing
    > some calendar software, and I want the user to fill in a form by
    > selecting a title from a drop-down list, generated by my MySQL
    > database. However, the program I'm customizing uses arrays, which is
    > where I'm stumped.
    >
    > What do I need to add to this code to make the array of titles(eg
    > "report writing" etc) come from my database, rather than the
    > manually-entered values that you can see here.
    >
    > The field I want to pull from is called com_courses.tit le
    >
    >
    >
    > array (
    > "coursetitl e",
    > "Course Title:",
    > $EXTRA_SELECTLI ST,
    >
    > array ("Report Writing", "Recruitmen t & Selection", "Presentati on
    > Skills", "Essential Telephone Skills", "Time Managememt", "Customer
    > Care", "Other"),
    > 0
    > ),
    >
    >
    > I hope it's not cheeky to ask this, and thank you sooooooooo much for
    > answering.
    > BTW I bought a book on Programming with PHP and MySQL, but it doesn't
    > answer this question, so I'm not being lazy. Honest.
    >
    > Jonny
    >[/color]
    Please do not double post. Your question will be answered, be patient.

    Joe Estock

    Comment

    Working...