This is probably a simple question but as a newbie I just aren't sure the best way to do it 😕
I'm developing a site with a shopping cart type feature, items added to the cart are inserted into a database and then I want to display the cart and allow the user to delete items or change the quantity of any items.
I could have each cart item within its own form with its own 'update' button but I'd like to just have one form for the whole cart and one 'update' button if possible so when the form is submitted it goes through each record on the form and deletes the records that have the delete checkbox checked and updates the records which have changed quantities.
I'm just not sure how to achieve this - Do I need to get my code to dynamically name the form fields (eg. ProductID1, ProductID2 etc.) and then how do I get it to loop through my form records?
Hope I've explained well enough! 🙂