<?php

$response = array();

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

    
// check for required fields
if (isset($_POST['data']))  {

$con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD,DB_DATABASE) or die(mysql_error());
$json=json_decode($_POST['data'],true);

$mail= $json['mail'];
$role=$json["role"];

$tasklistId=$json["tasklist"];
date_default_timezone_set('Asia/Calcutta');
$dt=date('Y-m-d H:i:s');


$query="UPDATE task_listtask SET l_deleted='yes',l_update_dateandtime='$dt',l_u_created_by_mailid='$mail',l_u_created_type='$role',l_u_datetime='$dt' WHERE listtask_id='$tasklistId'";
  

$response["s"] =mysqli_query($con,$query);
    mysqli_close($con);
} 
    echo json_encode($response);

?>