This is my code can you expllain how the user may activate or inactivate with check box....
<?php
mysql_connect("localhost","root","rootwdp");
mysql_select_db("rams");
if(isset($_REQUEST['submit']))
{
$arr=$_REQUEST['chk'];
foreach($arr as $key => $value)
{
$sql=mysql_query("update ram set status=1 where emp_id=$value");
}
$sql1="select * from ram where status=1";
$res1=mysql_query($sql1);
?>
<form action="" method="post" name="form">
<table border="1"><th>Username</th><th>Empid</th><th>Designation</th><th>Check box</th>
<?php
while($row1=mysql_fetch_array($res1))
{
?>
<tr>
<td><?php echo $row1[0];?></td>
<td align="center"><?php echo $row1[1];?></td>
<td align="center"> <?php echo $row1[2];?> </td>
<td align="center">
<input type="hidden" name="chk" id="chk" value="<?php $row1[1];?>"/>
<input type="checkbox" id="chk" name="chk" value="<?php $row1[1];?>" />
</td>
</tr>
<?php }
} ?>
</table></form>
<?php
mysql_connect("localhost","root","rootwdp");
mysql_select_db("rams") or die("unable to select");
$query = "SELECT * FROM `ram`";
$dd=mysql_query($query);
?>
<form action="" method="post" name="form">
<table border="1"><th>Username</th><th>Empid</th><th>Designation</th><th>Check box</th>
<?php
while( $row=mysql_fetch_array($dd))
{
?>
<tr>
<td><?php echo $row[0];?></td>
<td align="center"><?php echo $row[1];?></td>
<td align="center"> <?php echo $row[2];?> </td>
<td><input type="hidden" name="chk" id="chk" value="<?php $row[1];?>"/>
<input type="checkbox" id="chk" name="chk" value="<?php $row[1];?>"/></td>
</tr>
<?php } ?>
</table>
<table><tr><td> <input type="submit" name="submit" value="Submit" /></td></tr></table>
</form>