Dear friends, I recently encountered a problem with the color and size attributes of a product. For example, a product has two colors and three sizes.
Product A has a color design [black, white] and a size design [ S, M, L】
I want to click on the product list to go to the product details page, enter the quantity of each sku ordered, and then save and submit to the database. As shown below, can you give me some ideas? The color and size of each product are not fixed. The color and size information are retrieved from the database and displayed in an untabled header.
Use the `<input>` tag to create an input box, and use the `name` attribute to identify different SKUs. For example,
uses PHP to process form data and save it to the database. You can use the `$_POST` superglobal variable to get the form data and insert it into the database using SQL statements like