รายละเอียดของการตอบ ::
if(isset($_POST['txtManager'], $_POST['txtAuthen'], $_POST['txtStatus'])){
$Manager = $_POST['txtManager']; //textbox
$Authen = $_POST['txtAuthen']; //textbox
$Status = $_POST['txtStatus']; //textbox
foreach($_POST['Check_staff'] as $Chstaff){ //checkbox
$sql = "UPDATE ReqUser SET LvApprove = '$Manager', Authentication = '$Authen', Status = '$Status' WHERE EmpUserID = '$Chstaff' ";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false ) {
echo "<script type=text/javascript>alert('Unsuccessful error!');javascript:history.back(1);</script>";
exit();
}
else
{
echo "<script type=text/javascript>alert('Successfully updated');javascript:history.back(1);</script>";
exit();
}
}
}