<?php

$response = array();

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

    
// check for required fields
if (isset($_POST['data']))  {
    
$json=json_decode($_POST['data'],true);
$mail= $json['mail'];
$role=$json["role"];
$milestoneId=$json["milestoneid"];
date_default_timezone_set('Asia/Calcutta');
$dt=date('Y-m-d H:i:s');

$con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD,DB_DATABASE) or die(mysql_error());

$query="UPDATE task_milestone SET m_deleted='yes',m_u_created_by_mailid='$mail',m_u_created_by_type='$role',m_u_datetime='$dt',m_updatedateandtime='$dt' WHERE milestone_id='$milestoneId'";
$response["s"]=mysqli_query($con,$query);
mysqli_close($con);

} 
    echo json_encode($response);

?>