   <?php
   header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE");
   include "dbconfig.php";
$link = opencon();
 
      
       if(isset($_POST['lead_id']) || isset($_POST['id']))
       {
           
           $DATABASE_HOST = 'localhost';
$DATABASE_USER = 'hrdant7r_market';
$DATABASE_PASS = 'gAw=6Y79}FDN';
$DATABASE_NAME = 'hrdant7r_market';
// Try and connect using the info above.
$conn = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
           
              $id=$_POST['id'];
              if($id=="")
              {
                  $id=$_POST['lead_id'];
              }
           
$client_status =$_POST['client_status'];
$call_status =$_POST['call_status'];
$lead_status =$_POST['lead_status'];
$remarks =$_POST['remarks'];
$status_date=date("Y-m-d");
$sql="UPDATE `final_leads_education` SET `client_status`='$client_status',call_status='$call_status',status='$lead_status',status_date='$status_date',remarks='$remarks' WHERE `id`='$id'";

if (mysqli_query($conn,$sql)) {
      echo "success";

}   
else {
  echo "failed";
}
  
    
    

       }
       
       ?>