Add a counter to your first script that generates the form. Count how many records you're adding, then pass that value along using an input TYPE=HIDDEN field in the form. Then you can loop as many times as the counter value to receive all of the option buttons.