Hi Charles,

If you mean columns when you say rows the answer is no. When you mean rows
when your saying rows the answer is yes. That's what you are doing with your
code below.

Rolf

///////////////////////////////////////////////
/   Suicidal twin kills sister by mistake!    /
///////////////////////////////////////////////

-----Oorspronkelijk bericht-----
Van: The Image Builder [mailto:[EMAIL PROTECTED]
Verzonden: maandag 5 april 2004 4:01
Aan: [EMAIL PROTECTED]
Onderwerp: Drop down menu with PHP


Hello,

I have code for a drop down menu that works fine.  But, though I only want
the results from one row to fill the form, I want it to show 2 rows in the
drop down menu.  Can I do that? I would appreciate your help.  Here is what
I have now:

<? mysql_connect("localhost","user","password");
    mysql_select_db("database");
    $sql = "select distinct category from books ORDER BY category ASC";
    $makes_result = mysql_query($sql);
    print ("<select name=\"category\">\n");
    print("<option selected value=\"\">Please select a
Category</option>\n");
    while($row = mysql_fetch_row($makes_result))
    {
    print("<option value=\"$row[0]\">$row[0]</option>\n");
    }
    print("</select>"); ?>

Thanks in advance
   Charles

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to