<?php

$response = array();

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

    
// check for required fields
if (isset($_POST['mail']))  {
    
$mail= $_POST['mail'];
$cname=$_POST["cname"];
$role=$_POST["role"];
$name=$_POST["name"];
$mobile=$_POST["mobile"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$address=$_POST["address"];
$web=$_POST["web"];
$rnmae=$_POST["rnmae"];
$rmobile=$_POST["rmobile"];
$rmail=$_POST["rmail"];
$id=$_POST["id"];
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_client_company SET c_company_name='$name',c_responsible_person='$rnmae',c_company_mobile='$mobile',c_company_phone='$phone',c_responsible_mobile='$rmobile',c_responsible_mailid='$rmail',c_company_mailid='$email',c_company_address='$address',c_company_webaddress='$web' WHERE c_company_id='$id'";
    $response["s"]=mysqli_query($con,$query);
    mysqli_close($con);
} 
    echo json_encode($response);

?>