Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop-down 1

Status
Not open for further replies.

theevilone

IS-IT--Management
Aug 19, 2001
52
GB
I am designing a site which will be displaying clothes. There will be a administration and a user module. Each clothes item is available in a maximum of 10 colours. The administrator has to have the ability to define the 10 colours.

I have 1 table which contains all the item fields and another table, to which it is related, containing all the colours. The plan was to write an update page containing all the item fields, which includes 10 dropdowns for the 10 colours. I am having problems writing this page.

The customer will see, for each item, the colours defined by the administrator and be able to select a colour from that list.

Any help would be appreciated. If you need me to clarify further the description of the problem, please ask.

Thanks in advance.
 
TEO,

Give each set of ten color dropdowns the same name for each article of clothing, using the primary key of the article in the dropdown name (ex. Colors_598, where 598 is the primary key of the current article). Assign each option the value of the color's primary key. (Put a choice in the dropdown for "None" prior to constructing the color list, so you can handle articles with less than ten colors.)

When the user picks the colors for each article, and submits the update request, the color primary keys for each article will be sent to the action page in a single, comma-delimited list. You can then spin through that list and make updates to your article/color associations.

HTH,

Phil Hegedusich
Senior Web Developer
IIMAK
-----------
Boy howdy, my Liberal Studies degree really prepared me for this....
 
Got it working with your suggestion with 1 or 2 small changes. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top