if(isset($_POST['Active']) && isset($_POST['Box'])){
$status= $_POST['activation'];
foreach($_POST['Box'] as $remove_ch){
$sqlupd= "update Pre_Enrollment set Status='$status' where Checkbox_Id='$remove_ch'";
$resultupdate = mysqli_query($database,$sqlupd) or die (mysqli_error($database));
if($resultupdate){
echo "<meta http-equiv=refresh content=\"0; URL=../Admin/admin pre-enrollment.php\">";
}
}
}
from this code, i need to update the status using checkbox but its update only the last row I have, and then it allows me to update the rest with the same choice of first one, considering that status are option list. can you please tell me what is wrong?