your help is greatly appreciated.. thanks
here's the code:
NOTE: this code is cut short, i only posted the part where i got stuck
Expand|Select|Wrap|Line Numbers
- <?php
- if(isset($_GET['sub'])){
- $num = $_GET['num'];
- $num = 2;
- for($i=1; $i<=$num; $i++ ){
- echo '
- <tr>
- <td align="center">
- Question no.: '.$i.'
- <br>
- A.<input type="radio" name="'.$i.'[]"
- value="A"><br>
- B.<input type="radio" name="'.$i.'[]" value="B"><br>
- C.<input type="radio" name="'.$i.'[]" value="C"><br>
- D.<input type="radio" name="'.$i.'[]" value="D"><br>
- </td>
- </tr>';
- }
- }
- if($_GET['eva']){
- $choice = $_GET['$i']; //this is where i got stuck
- foreach($choice as $opt){
- echo $opt;
- }
- }
- ?>
- <tr>
- <td align="center">
- <input type="submit" name="eva" value="evaluate">
- </td>
- </tr>