ok
Direktori : /home2/selectio/public_html/wedding-info/api/ |
Current File : /home2/selectio/public_html/wedding-info/api/religion_delete.php |
<?php include_once('config/config.php'); include_once('config/custom-functions.php'); include 'config/send-sms.php'; $return_arr = array(); // Initialize the return array try { $ids = $_GET['ids']; error_log($ids); // Prepare and execute the SQL statement $statement = $pdo->prepare("DELETE FROM `tbl_category` WHERE id=".$ids); $result = $statement->execute(); if ($result) { $return_arr['message'] = 'Category Deleted successfully.'; $return_arr['status'] = 200; } else { $return_arr['message'] = 'Something went wrong.'; $return_arr['status'] = 400; } } catch (Exception $e) { $return_arr['message'] = $e->getMessage(); $return_arr['status'] = 500; error_log($e->getMessage()); } echo json_encode($return_arr); ?>