Chris -

You're getting already getting plenty of answers to this question - I only have one 
suggestion, which is that if you're not doing it already, just write a function or 
create an object that makes a dropdown box. I have a function and a class that I use 
for creating
dropdowns. Well, several functions... one that queries a db with db, table, id field, 
label field, etc. and produces a dropdown with options having one value and labels 
having another, one that accepts an array or a 2-dimensional array, and one that 
accepts a numeric range
as arguments etc. etc. It will save you a ton of time... (rather than intruding into 
your html form with a long php statement, why not just call: <? select_array("name", 
$array); ?>).


Chris Payne wrote:

> Hi there everyone,
> I have a shopping cart which is starting to work nicely, but I have to select 
>size/color from the entries, how do I do this dynamically in PHP with MySQL?  I need 
>them to be dropdown form boxes but haven't got a clue how to populate them from the 
>fields of my database.
> Please help me with example code if possible, it would be greatly appreciated :-)
> Thank you everyone
> Regards
> Chris

Dan Barton
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to