Hello! I'm developing a website for an university assignment. The website is an online shop and i'm currently design the shopping cart with PHP. When the user view the shopping cart, the website is generating a table with 4 colums and as many rows as the items he has in his shopping cart. The problem now is that in 1 column I have an <INPUT TYPE=text> for the quantity of the products. How can I detect which INPUT TYPE the user has changed in order to update the database? I thought that I could add an ID column but I don't know what can I read data from the table... Thanks alot!
If you name each of the inputs like: <input type="text" name="quantity[]"> Then after sending form by POST you can loop thru all quantity fields: foreach($_POST['quantity'] as $item_$quantity) { // do something } PHP: Hope that helps.