51 lines
2.1 KiB
PHP
51 lines
2.1 KiB
PHP
<?php
|
|
include('includes/config/config.php');
|
|
$beneficiary_id = number_format($_REQUEST['beneficiary_id']);
|
|
|
|
$query = " select * from beneficiaryinfo where beneficiary_id='" . ($_REQUEST['beneficiary_id']) . "' ";
|
|
error_log("query " . $query);
|
|
if (!$result = @mysqli_query($conn, $query)) {
|
|
error_log("Failed to get the training program details:" . mysqli_error($conn) . " Failing Query:" . $query);
|
|
exit(mysqli_error($conn));
|
|
}
|
|
$data = array();
|
|
if (mysqli_num_rows($result) > 0) {
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
// $data = $row;
|
|
$data['beneficiary_id'] = $row['beneficiary_id'];
|
|
$data['beneficiary_category'] = $row['beneficiary_category'];
|
|
$data['beneficiary_name'] = $row['beneficiary_name'];
|
|
$data['father_husband_name'] = $row['father_husband_name'];
|
|
$data['age_birth_date'] = $row['age_birth_date'];
|
|
$data['gender'] = $row['gender'];
|
|
$data['registration_id'] = $row['registration_id'];
|
|
$data['identity_type'] = $row['identity_type'];
|
|
$data['identity_number'] = $row['identity_number'];
|
|
$data['phone_number'] = $row['phone_number'];
|
|
$data['activation_date'] = $row['activation_date'];
|
|
$data['status'] = $row['status'];
|
|
$data['activation_status'] = $row['activation_status'];
|
|
$data['residing_village'] = $row['residing_village'];
|
|
$data['post'] = $row['post'];
|
|
$data['district'] = $row['district'];
|
|
$data['state'] = $row['state'];
|
|
data['tehsil'] = $row['tehsil'];
|
|
$data['pin_code'] = $row['pin_code'];
|
|
data['qualification'] = $row['qualification'];
|
|
data['experience'] = $row['experience'];
|
|
data['benefit_program_eligibility'] = $row['benefit_program_eligibility'];
|
|
data['distribution_center'] = $row['distribution_center'];
|
|
|
|
//$data['ohc_logo'] = base64_encode($row['ohc_logo']);
|
|
$data['beneficiary_info'] = base64_encode($row['beneficiary_info']);
|
|
|
|
}
|
|
} else {
|
|
$data['status'] = 200;
|
|
$data['message'] = "Data not found!";
|
|
}
|
|
|
|
error_log("data ". print_r($data, true));
|
|
|
|
echo json_encode($data);
|