ok
Direktori : /proc/self/root/home2/selectio/www/wedding-info-new/admin/api/ |
Current File : //proc/self/root/home2/selectio/www/wedding-info-new/admin/api/religion_edit.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 if (isset($_POST['type']) && $_POST['type'] == 'upload') { try { $ids=$_GET['id']; $cat_name = $_POST['cat_name']; $d_order = $_POST['d_order']; $sub_cat_avl = $_POST['sub_cat_avl']; $status = $_POST['status']; $new_image = $_POST['new_img_name']; $zodiac = $_POST['zodiac']; $new_img_name = $_POST['new_img_name']; error_log($ids.$cat_name.$d_order.$sub_cat_avl.$status.$new_image.$zodiac.$new_img_name); error_log("hello"); // Prepare and execute the SQL statement $statement = $pdo->prepare("UPDATE `tbl_category` SET `cat_name`=?, `status`=?, `add_productdetails`=?, `d_order`=?, `product_img`=?,`zodiac`=? WHERE `id`=?"); $result = $statement->execute(array($cat_name, $status, $sub_cat_avl, $d_order, $new_img_name, $zodiac,$ids)); if ($result) { $return_arr['message'] = 'Category updated 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); } ?>