I am trying to design a simple inventory tracking page with MySQL. Here is how far I am: http://www.localheroclothing.com/viewall.php. My problem deals with updating the quantity. I'm pretty new to MySQL, and I'm looking for a little advice/help on how to go about doing this.
My idea is that each quantity is in a text input where I can either change the number or click the button next to the box (JS). The buttons are not hooked to the box yet because I haven't figured out how to make each field name unique or if that would mess up the MySQL stuff. I don't want to have to submit after every change, I want to be able to make all the changes and submit them all at once.
Finally my specific questions: I have read a little about the UPDATE command, but I'm not sure how to use it in my situation where many things need updated. How would I go about displaying each DB table row and have the ability to update it?
(If it matters) I also need to make each field name unique to use my JS "+" and "-" buttons.
I appreciate any suggestions about how to tackle this. Here is the stipped-down code of the page:
#connect to inventory database and Products table works
$sql="select product, productsize, productcolor, productquantity from Products order by product, productcolor";