ok
Direktori : /proc/self/root/home2/selectio/www/y1jobportal.in/apps-api/ |
Current File : //proc/self/root/home2/selectio/www/y1jobportal.in/apps-api/category-drop-down.php |
<?php include_once('config/config.php'); include_once('config/custom-functions.php'); include 'config/send-sms.php'; $fn = new custom_functions(); date_default_timezone_set('Asia/Kolkata'); $today=date('d-m-Y h:m:s A'); try{ $sql="SELECT id,name FROM category where id!=0 and status=1 order by id asc"; $statement = $pdo->prepare($sql); $statement->execute(); $res = $statement->fetchAll(PDO::FETCH_ASSOC); if (!empty($res)) { $response['error'] = false; $response['message'] = "State fatched successfully."; $response['data'] = $res; } else { $response['error'] = true; $response['message'] = "Something went wrong, please try again leter."; } $pdo = null; print_r(json_encode($response)); }catch(Exception $e){ $response["error"] = true; $response["status_code"] = '403'; $response["status"] = 'Forbidden'.$e; $pdo = null; print_r(json_encode($response)); return 0; } ?>