i created radio button.but I want to update records suppose at the time of creation i selected present but when i want to update record that time that radio button not showing selected plllzzz anybody help me
here is my update code i m creating add more radio buttons
<table id="mytbl">
<tr>
<td>Subject</td>
<td>Marks</td>
<td>Attendance</td>
</tr>
<?php if(empty($_GET['id'])){?>
<tr class="mainrow">
<td><?php echo $form->textField($Studmarks,'Subject[]',array('size'=>20,'maxlength'=>11)); ?></td>
<td><?php echo $form->textField($Studmarks,'Marks[]',array('size'=>20,'maxlength'=>11)); ?></td>
<!-- <td><?php //echo $form->checkBoxList($Studmarks,‘language[0]’,array(‘java’ => ‘Java’,‘C++’ => ‘C++’)); ?></td>
-->
<td><?php echo $form->radioButtonList($Studmarks,'attendance[0]',array('present'=>'present','absent'=>'absent'));?></td>
<td><button type="button" name="add" id="add">Add more</button> </td>
</tr>
<?php }
else
{
$arr_len = count($Studmarks);
$a=1;
for($i=0;$i<$arr_len;$i++)
{
?>
<tr>
<td>
<input type='hidden' name='StudMarks[Mid][]' id='MarksData_marks_id' value="<?php echo $Studmarks[$i]['Mid'];?>">
<input size="20" maxlength="11" name="StudMarks[<?php echo $i;?>]" id="StudMarks_Subject" type="text" value="<?php echo $Studmarks[$i]['Subject'];?>"></td>
<td><input size="20" maxlength="11" name="StudMarks[<?php echo $i;?>]" id="StudMarks_Marks" type="text" value="<?php echo $Studmarks[$i]['Marks'];?>"></td>
<td><input size="20" maxlength="11" name="StudMarks[<?php echo $i;?>]" id="StudMarks_attendance" type="radiobutton" value="<?php echo $Studmarks[$i]['attendance'];?>" uncheckValue="null"></td>
<td><input size="20" maxlength="11" name="StudMarks[<?php echo $i;?>]" id="StudMarks_attendance1" type="radiobutton" value="<?php echo $Studmarks[$i]['attendance'];?>" uncheckValue="null"></td>
<?php if($a==1){?>
<td><button type="button" name="add" id="add">Add more</button>
<?php $a++;
}?>
</tr>
<?php }
}?>
</table>