ok
Direktori : /home2/selectio/www/caliberembedded.com/admin/api/ |
Current File : /home2/selectio/www/caliberembedded.com/admin/api/custom-function.php |
<?php include"../config/config.php"; if($_POST['type']=="2"){ $location = $_POST['location']; $statement = $pdo->prepare("SELECT id,employee_name FROM `tbl_employee` where status=1 and location=$location"); $statement->execute(); $query = $statement->fetchAll(PDO::FETCH_ASSOC); $return_arr = array(); foreach( $query as $row ) { $return_arr[] = $row; } echo json_encode($return_arr); } ?>