ok
Direktori : /proc/self/root/home2/selectio/www/y1jobportal.in/admin/api/ |
Current File : //proc/self/root/home2/selectio/www/y1jobportal.in/admin/api/get-district-api.php |
<?php include "config/config.php"; // Get Student Room Payment Details if($_POST['type']=="get_district"){ $state_id = $_POST['state_id']; $where=""; $condition =''; $city = $_SESSION['y1_jobs']['city'] ?? null; if($_SESSION['y1_jobs']['role_json'] == 2){ $condition.= " and id IN ($city)" ; } $statement = $pdo->prepare("SELECT * FROM `district` WHERE state_id=$state_id $condition"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $totalrow = $statement->rowCount(); if($result){ $response['data']=$result; $response['error']=false; $response['message']="District Details Fetched Successfully"; }else{ $response['count']=0; $response['error']=true; $response['message']='failed'; } echo json_encode($response); } ?>