I have a form created by looping through an sql. Each line of that form contains 4 form elements for an individual record. (quantity, ID, size and colour).
I'd like to be able to update all the records from the one screen.
Now I've done this before but only on single form elements, ie updating one single column of values in the database by combining the ID with the value then exploding in a foreach as construct upon submission and running a generated sql on each pair value.
I've got all four form elements acting to create arrays, but I can't seem to be able to then loop through all four arrays at the same time taking the relevant values for each line to use for my update sql.
I've tried a for ($i=0, $i<=$end, $i++) { and then using the value of $i as the key in the array (ie $array['$i']) but that don't work
I've tried naming the form elements as item['col1'] item['col2'] etc but that didn't work.
I guess you could say that I'm stumped! Any suggestions?