<?php
include("common/connection.php");
$status=mysqli_real_escape_string($con,$_REQUEST['Status']);
$Lead_req_Id=$_REQUEST['Lead_Id'];

$insert_communication_sql="insert into communication_master(Lead_ID,Date_Of_Communication,Communication_Type,Communicator_ID,Status,Active) values('".$Lead_req_Id."','".date('Y-m-d H:i:s')."','Call','".$_SESSION['user']."','".$status."','Yes')";
$insert_communication_query=mysqli_query($con,$insert_communication_sql);

$insert_call_log_sql="INSERT INTO call_log_master(Lead_ID,Caller_ID,Datetime_of_Response,Status) VALUES ('".$Lead_req_Id."','".$_SESSION['user']."','".date('Y-m-d H:i:s')."','".$status."');";
$insert_call_log_query=mysqli_query($con,$insert_call_log_sql);
$update_call_sql="Update lead_master set Status='".$status."',Lead_Modification_Date='".date('Y-m-d H:i:s')."' where Lead_ID = '".$Lead_req_Id."'";
$update_call_query=mysqli_query($con,$update_call_sql);

?>