In the seccond loop, where you output the radio button, you can use the question ID as name attribute, as in
PHP Code:
echo '<input type="radio" name="' . $qid . '" value="' . $aid . '">';
Then you would end up with an array where the question IDs are keys and the selected awnser are value, as in
PHP Code:
$_POST = array( 'qid_1' => 'aid_1', 'qid_2' => 'aid_2', 'qid_3' => 'aid_3', ... );
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
|