I have problem to insert value of fields as checkbox checked .

please help me.

<ol  >
	$i = 0;  
   $sql="SELECT * FROM import_master WHERE mawb='".trim($_GET['id'])."' ORDER BY conzName";
    while($row = mysql_fetch_array($rs))
           <div><table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
            <td class="label" >
            <input type="checkbox" id="chb[]" name="chb[]"  value="<?php echo $i++;?>" /></td>  
            <td width="804" class="label" colspan="2">
            Conz.Name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="conzname[]" type="text" class="box" id="conzname[]" size=            "20" maxlength="255" value="<?php
			 echo $row['conzName'];?>" /><br/>
            Conz.Adress &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea name="address[]" id="address[]" cols="30" rows="4"><?php echo $row['conzAddress'];?></textarea><br/>
            pkgs.No &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="pkgsno[]" 
            type="text" class="box" id="pkgsno[]" size="20" maxlength="255" value="<?php echo $row['pkgsNo'];?>" /><br/> 
           <!-- Retrieved By &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="retrievedby" type="text" class="box" id="retrievedby"            size="20" maxlength="255" value="<?php echo $row['conzName'];?>"/>
            Packed By &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="packedby" type="text" class="box" id=            "packedby" size="20" maxlength="255" value="" /><br/> -->

you can use echo to do this.


<input type="checkbox" name="something" <?php if ($i=1){ echo "checked";)/>

This is a way to do it, but I would amend it to

<input type="checkbox" id="chb[]" name="chb[]"  value="<?php echo $i++;?>" <?php if ($i=1){ echo "checked=\"checked\" ";)/>