ESH/select_staffmaster.php
2024-10-23 18:28:06 +05:30

39 lines
1.3 KiB
PHP

<?php
include('includes/config/config.php');
$staff_id = $_REQUEST['staff_id'];
$query = "select * from staff_master where staff_id = '".$staff_id."' ";
if (!$result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}
$data = array();
if(mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
$data['staff_id'] = $row['staff_id'];
$data['staff_name'] = $row['staff_name'];
$data['father_name'] = $row['father_name'];
$data['emp_code'] = $row['emp_code'];
$data['dob'] = $row['dob'];
$data['gender'] = $row['gender'];
$data['phone_number'] = $row['phone_number'];
$data['address'] = $row['address'];
$data['staff_category'] = $row['staff_category'];
$data['designation'] = $row['designation'];
$data['email_id'] = $row['email_id'];
$data['aadhar_no'] = $row['aadhar_no'];
$data['blood_group'] = $row['blood_group'];
$data['doj'] = $row['doj'];
$data['image_logo'] = base64_encode($row['image_logo']);
$data['image_type'] = $row['image_type'];
}
}
else
{
$data['status'] = 200;
$data['message'] = "Data not found!";
}
echo json_encode($data);
?>