<?php
include("../../db.php");

$status = 0;
$msg = 'Unknown error';

$ct_id = $_POST['ct_id'];
$rem   = $_POST['remark'];
$admin_id = $_POST['admin_id'];

$array = array("admin_id" => $admin_id, "leave_status" => 2, "remarks" => $rem);

$flgIn = $db->updateAry("teacher_leave", $array, "where content_id = '$ct_id' ");

if ($flgIn > 0) {
    $status = 1;
    $msg = 'Record updated successfully';
} else {
    $msg = "Unable to update info...! Please try again later";
}

echo json_encode(array("status" => $status, "msg" => "$msg"));