<?php
require_once('dbConnect.php');
if($_SERVER['REQUEST_METHOD']=='POST') {

   $id= $_POST['id'];
               
                $status= $_POST['status'];
                $salesman= $_POST['salesman'];

  $sql = "SELECT * FROM kt_driver_task 
                   where customer_name LIKE '%$salesman%' 
                   AND status LIKE '%$status%' 
                   AND task_id LIKE '%$id%' 

                   ORDER BY task_id DESC";
  $res = mysqli_query($con,$sql);
  $result = array();
  while($row = mysqli_fetch_array($res)){
    array_push($result, array('id'=>$row[0], 'desg'=>$row[6], 'name'=>$row[2], 'salary'=>$row[28]));
  }
  echo json_encode(array("value"=>1,"result"=>$result));
  mysqli_close($con);
}