$sqlUpdateStatement0 = "UPDATE expert SET status=0 ";
mysql_query($sqlUpdateStatement0);
if(isset($_POST['status']))
{
$arr_active_exam = $_POST['status'];
if(sizeof($arr_active_exam)>0)
{
foreach($arr_active_exam as $id)
{
$sqlUpdateStatement1 = "UPDATE expert SET `status`=1 WHERE id='$id'";
mysql_query($sqlUpdateStatement1); // update all to 1 which is checked
}
}
}