ok
Direktori : /home2/selectio/public_html/subamangala/admin/api/ |
Current File : /home2/selectio/public_html/subamangala/admin/api/get-bus-details-api.php |
<?php include "../config/config.php"; if($_POST['type']=="get_bus_details"){ $trip_id = $_POST['trip_id']; $where=""; if($trip_id!=''){ $where="WHERE id=$trip_id"; } $statement = $pdo->prepare("SELECT * FROM `tbl_trips` $where"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $totalrow = $statement->rowCount(); if($result){ $response['data']=$result; $response['error']=false; $response['message']="Bus Details Fetched Successfully"; }else{ $response['error']=true; $response['message']='failed'; } echo json_encode($response); } ?>