Okay, here's the situation:
I have a simple form that the user can sort by different categories, and adjust two parameters of each element. So for example, the form looks like:
ID: 1
Name: Dave One
Amount1: 60
Amount2: 42
ID: 2
Name: Greg One
Amount1: 33
Amount2: 15
ID: 3
Name: Greg Two
Amount1: 22
Amount2: 52
and so on...
The user can make it display Gregs only, Dave only, change the amounts and submit, but I can only get it to work when there is a single element displayed at a time ie: when I don't try to get it to accept and store as an array. The problem is that when I have multiple elements submitted I can't get the action file to understand it. Here's what I'm doing so far:
The form id's each field with the ID number, such as: amount1_$ID
so I have...
amount1_1 (Dave)
amount1_2 (Greg)
etc..
as what is being submitted.. problem is the action file can't predict how many variables it's gonna get so I don't think I can get it to work this way.
So I'm looking into arrays, but getting confused. Any help would be greatly appreciated, not looking for an easy answer, just a point in the right direction and I can figure it out from there.
I just want to know how I should be labelling my form ID's, what variables I need to send to the action file, and how I can get the action file to read it and update the appropriate fields. I feel like I need to do some kind of while function in the action file but not sure.