query($updatePCP) === TRUE) { } $sql = "UPDATE `pef_evaluation_data` SET `next_head_approval_id`='$userID', `next_head_approval_date`='$myTimeStamp', `next_head_notes`='$raterAgreeNotes' WHERE `pcp_id`='$pcpID' AND `emp_record_id`='$getEmpRecordID'"; if ($conn->query($sql) === TRUE) { } //get employees information so we can query the approver based on setup $getempInfor = "SELECT * FROM `pms_employee_data` WHERE `deleted`='0' AND `id`='$getEmpRecordID'"; $getempInfo = mysqli_query($conn,$getempInfor); while($eRow = mysqli_fetch_array($getempInfo)){ $empSect = $eRow['unit_id']; //2 $empDept = $eRow['department_id'];//3 $empDivM = $eRow['division_id'];//4 $empDivG = $eRow['sub_group_id'];//5 $empBrnh = $eRow['branch_id'];//6 $empComp = $eRow['comp_id'];//7 $empEmail = $eRow['mail'];//7 $empMobile = $eRow['mobile_no'];//7 } //E-MAIL INFO $from = "support@autohubgroup.comp"; $to=$empEmail; $subject = "PEF APPROVED"; $msgBox = "Good day! ".$myMessage." , please login to https://pms.autohub.ph"; $headers = "From:" . $from; mail($to,$subject,$msgBox, $headers); //END OF EMAIL INFO $conn->close(); } ?>