<?php

$response = array();

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

    
// check for required fields
if (isset($_POST['data']))  {
    
$mail= $_POST['mail'];
$cname=$_POST["cname"];
$role=$_POST["role"];
$projectId=$_POST["id"];

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

date_default_timezone_set('Asia/Calcutta');
$dt=date('Y-m-d H:i:s');

    $query="UPDATE task_project SET p_deleted='yes',p_u_created_by_mailid='$mail',p_u_created_by_type='$role',p_u_datetime='$dt',P_update_time='$dt' WHERE project_id='$projectId'";
    $response["s"] =mysqli_query($con,$query);
    mysqli_close($con);
} 
    echo json_encode($response);

?>