I am having following codings in my form..how do I get the value of all radio button values on submit which is inside looping? Or give me any other solution for this.
Use array of radio button as follows
To access the posted values, you can simply use $_POST['optradio']
Considering the selection for 5 questions to be Option 1, Option 2, Option 3, Option 1, Option 2
POST['optradio']
will give array like
Array ( [1] => a [2] => b [3] => c [4] => a [5] => b )
To access sigle values from this array, you can use foreach
loop as,
$option_val)
echo $option_num." ".$option_val."
";
?>