I'm quite confused on how to access the values of a field, i have 2 fields which accepts several inputs let's call it r_id[ ]
and qty[ ]
and i need to access each of their values independently
now supposedly this should loop depending on how many r_id's
are inside the input post
foreach ($_POST['r_id'] as $row)
r_id
is used to verify how many qty s should i put on a r_id
input e.g:
r_id=1,2
qty=3,16
what should happen is on a row with an r_id
of 1 i will take the old qty with a sample value of 5 and minus the new qty 3
and then on the second iteration r_id 2
old value of qty minus new qty 16
and so on
these are the forms i used
<input type="text" name="r_id[]" class="form-control inline" value="" required>
<input type="number" step="0.001" name="qty[]" class="form-control inline" value="" required>
i made a javascript to add similar fields up to 10 so that explains why i use an array