View Full Version : what is the idea behind this table ?

07-02-2006, 11:00 PM
I saw many sites uses table of sizes and colors for each product so visitor can select the color/size he/she wants by clicking on small image represents color or key - Is there any one can tell how this can be done:

here is a link:


07-03-2006, 12:07 AM
Could you be more specific about which part you need help with?

07-03-2006, 01:37 PM
in this page there is a table of colors/sizes for the product if you click on the desired color/size it will be added to shopping cart

I need to know how to design such table in database and what java script and php script I should use ?

I tried to think if my product table must two fields for colors and other for sizes and store them like array (red,blue, pink,...) but it can not be the solution because there is specific sizes for each color also some of colors/sizes is not availabe

so what database design I should use and how to implement that using javascript/php,
I tried to search the net for tutorial of this kind but I was not lucky