Hi ! Following is my complete code file .Sessions are starting in other file, which is not shown here.Actually is include file and is being used in many other files. CODE : <form name="frm" method="post" enctype="multipart/form-data" onSubmit="return chek('submit/product.php');"> <? if($_POST['mcat']) { $chk = "where mcat = '$_POST[mcat]'"; } else { $chk = "where 1"; } $rcount = mysql_num_rows(mysql_query("select * from product $chk")); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td><table width="95%" border="1" bordercolor="#000000" cellspacing="0" cellpadding="0" align="center" bgcolor="<? echo ADMIN_MAIN_BG;?>"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr bgcolor="<? echo MAIN_HEADER_BG;?>"> <td valign="top"><? if($_GET['msg'] == 'E') { echo"<div align=center class=myalert>Record Has Been Updated Successfully.</div>"; unset($_GET['msg']); } if($_GET['msg'] == 'D') { echo"<div align=center class=myalert>Record Has Been Deleted Successfully.</div>"; unset($_GET['msg']); } ?></td> </tr> <tr> <td valign="top"><table width="100%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="<? echo ADMIN_TABLE_BORDER_COLOR;?>"> <tr> <td colspan="4"><div align="center" class="myhtext">VIEW PRODUCT DETAILS</div></td> </tr> <tr> <td colspan="4" align="right"> <? $csql = "select * from productcategory order by title"; $cqry = mysql_query($csql); ?> <select name="mcat" onChange="myfunc('frm','product.php');" class="myinput"> <? echo "<option value=''>-All-</option>"; while ($cres = mysql_fetch_array($cqry)) { if(($cres['id'] == $mcat) || ($cres['id'] == $_GET['mcat'])) { echo "<option value=$cres[id] selected>$cres[title]</option>"; } else { echo "<option value=$cres[id]>$cres[title]</option>"; } } ?> </select> <a href="addproduct.php" class="adm">Add New Product</a></td> </tr> <? if($rcount>0) { ?> <!-- <tr> <td colspan="4"> <? //include "../main/page.php"; ?> </td> </tr> --> <tr> <td width="3%"> </td> <td width="3%"><div align="center" class="mytext">ID</div></td> <td width="73%"><div align="center" class="mytext">DETAIL</div></td> <td width="21%"> </td> </tr> <?php if($_POST['mcat']) { $chk = "where mcat = '$_POST[mcat]'"; } else { $chk = "where 1"; } $sql= "select * from product $chk order by id "; $cnx = mysql_query($sql); while($res = mysql_fetch_array($cnx)) { ?> <tr> <td><div align="left" class="mytext"><input type="checkbox" name="chkdel[]" value="<? echo $res['id'];?>"></div> </td> <td><div align="center" class="mytext"><?php echo $res['id'];?></div> </td> <td align="center"> <?php echo $res["description"];?> </td> <td><div align="center"> <a href="addproduct.php?mid=<?php echo $res['id'];?>&act=E&mcat=<? echo $mcat;?>" class='adm'>Edit</a> <?php if ($res['enable']){echo"<a href='submit/product.php?mid=$res[id]&act=EN&flag=E&mcat=$mcat' class='kf'>Enabled</a>";}else{echo "<a href='submit/product.php?mid=$res[id]&act=EN&flag=D&mcat=$mcat' class='mysalert'>Disabled</a>";}?></div> </td> </tr> <?php } ?> <tr> <td colspan="4"><div align="center"><input type="submit" name="delsubmit" value="Delete" class="btn"> </div></td> </tr> <?php } else { echo"<tr><td colspan='4'><div align='center' class='myalert'>No Record Available</div></td></tr>"; } ?> <input type="hidden" name="act" value="D"> </table></td> </tr> </table></td> </tr> </table></td></tr> <tr> <td> </td> </tr> </table> </form>