SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Threaded View

  1. #1
    midnight coder
    Join Date
    Dec 2000
    The flat edge of the world
    0 Post(s)
    0 Thread(s)
    I'm trying to generate a list of drop-down list box, and each list box gets it's options from MySQL, goes something like:

    PHP Code:

    mysql_query ("SELECT firstname, lastname FROM table ORDER BY lastname") or die (mysql_error());

    while (

    "<select name=\"name\">";
        while (
    $row mysql_fetch_array($sql))
    extract ($row);
    "<option value=\"$fname $lname\">$lname$fname</option>\n";


    I get something like:

    list box 1: Elvis Presley, Bob Marley, Bill Gates, Steve Jobs

    list box 2:

    list box 3:

    list box 4:

    Basically I get 4 list boxes, which is what I want, but only the first list box has the correct options, the others have no options at all.
    Last edited by Robo; Apr 28, 2001 at 00:29.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts