Hi Michael,
Yes I do! Take a look at the code snippet below:
echo "<select name=something>";
$level2 = $db->execute("select typename from types");
do {
$value=$level2->fields[0];
echo "<option value=$value>$value</option>";
$level2->nextRow();
} while (!$level2->EOF);
$level2->close();
echo "</select>";
Just change the query in the 2nd line of the code to the
desired query. You'll see the result ;-)
Best of luck,
Ahmad Anvari da Code Guru
----- Original Message -----
From: RealGM
To: [EMAIL PROTECTED]
Sent: Saturday, March 10, 2001 4:21 PM
Subject: [PHP] Combo Box containing field
Hi,
Does anyone know how I can create a combo box in my php file that reads the options
in from a database field?
I can create combo boxes fine containing values that I enter, but I want it to read
the values from the database into the drop down box for the user to select.
Thanks,
Michael.