Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-19-2004, 01:34 PM
WebProWorld New Member
 

Join Date: May 2004
Location: London, England
Posts: 3
Chris W.P. RepRank 0
Default PHP MySQL Multiple Column Dynamic Dropdown

Please some help required!

I am currently in the process of setting up an e-commerce suite on a website, but as I am a PHP MySQL newbie I have come across a few problems. I have a product page which has static information on it (plain HTML built using Dreamweaver 4).

I have a form with a dropdown box. I want this dropdown box to show data from three different columns in a MySQL database table. These would be, Colour, Size and Price.

I have the database setup and running with Apache, PHP and MySQL all installed, configured and fully operational.

I am using Dreamweaver MX 2004 now and have already setup the dropdown on the page using the DW insert List/Menu feature. I have been able to select what
dynamic data I would like to show by use of a recordset I have already setup with all the relevant columns.

The first problem I have is the DW insert list/menu feature only allows me to show one column of data. I want to show all three one after the other in
the same dropdown box. I am sure this is possible because I have done this using SQL in MS Access. I am unsure how this is done in PHP MySQL.

The second problem I have is that I would like the selected data from the dropdown to be transported to the next page which will be the Review Cart page. I have read on forums that the use of variables would do this for me but am unsure as to how I would implement them into dropdown on the product page.

The third problem I have is I do not quite understand how the dropdown would only show the Colour, Size and Price options for the specific product on that product page. I have a dynamic dropdown tutorial which states that a parent and child lists would be needed, but seeing as I am only having one dropdown box, I think the child list would not be necessary.

Would I need to put a parentID column in the database table and give an ID for each set of options? For example, Bracelet would have Silver, Gold and Silver Plate.

Would I need to put an ID of 1 for each of these and then go on to put 2 for the next set of options for another product and 3 for the next and so on?

Any help would be much appreciated.
__________________
Chris W.P.
Webmaster
The Annabel Chaffer Collection, London, England
http://www.annabelchaffer.co.uk
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0