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

  
                $id= $_POST['id'];
		$driver_id= $_POST['driver_id'];


  $sql = "SELECT * FROM kt_driver_task 
                   where  
                    (contact_number LIKE '%$id%' OR customer_name LIKE '%$id%') AND complaintlodgeby LIKE '%$driver_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[7], 'salary'=>$row[14]));
  }
  echo json_encode(array("value"=>1,"result"=>$result));
  mysqli_close($con);
}