<?php
include("../../db.php");
header('Content-Type: application/json');

$rec_id = $_GET['receipt'];

$status = 0;
$msg = "Unable to update record..!";

if ($rec_id != '' && $rec_id > 0) {

    $res = $db->updateAry("faculty_inventory_receipt", array("rec_status" => "1"), " where rid='$rec_id'");
    if ($res){
        $status = 1;
        $msg = "Item(s) approved successfully";
    }

}

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