//retrive gender and checkbox value in edit form
$gender=$row['gender'];
$chkhobby=$row['chkhobby'];
<tr>
<th>GENDER</th>
<td>
Male<input type="radio" name="gender" value="1" <?php echo ($gender== '1') ? "checked" : "" ; ?>/>
Female<input type="radio" name="gender" value="0" <?php echo ($gender== '0') ? "checked" : "" ; ?>/>
</td>
</tr>
<tr>
<th>Hobbies</th>
<td>
<pre><?php //print_r($row);
$hby = @explode(",",$row['chkhobby']);
//print_r($hby);
?></pre>
read<input id="check_1" type="checkbox" name="chkhobby[]" value="read" <?php if(in_array("read",$hby)){?> checked="checked"<?php }?>>
write<input id="check_2" type="checkbox" name="chkhobby[]" value="write" <?php if(in_array("write",$hby)){?> checked="checked"<?php }?>>
play<input id="check_4" type="checkbox" name="chkhobby[]" value="play" <?php if(in_array("play",$hby)){?> checked="checked"<?php }?>>
</td>
</tr>
//update
$gender=$_POST['gender'];
$chkhobby = implode(',', $_POST['chkhobby']);