<?php

// array for JSON response
$response = array();

// include db connect class
require_once __DIR__ . '/db_config.php';


if (isset($_POST['id'])) {
    
    $con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD,DB_DATABASE) or die(mysql_error());
    $id=$_POST['id'];
  
    $query="UPDATE scheduleassigndate SET status='completed' WHERE assignschedule_id='$id'";
    
    if (mysqli_query($con,$query)) {
        $response["s"] = 1;
    } else {
        $response["s"] = 0;
    }
    mysqli_close($con);
}
     // echoing JSON response
    echo json_encode($response);

?>