<?php
require('../config/dbcon.php');
if (isset($_POST["id"])) {
	$output = array();
	$query = "Select * from truck_mst where id =" . $_POST["id"] . "";
	if (mysqli_query($connect, $query)) {
		$result = mysqli_query($connect, $query);
		while ($row = mysqli_fetch_array($result)) {
			$output['id'] = $row["id"];
			$output['truck_number'] = $row["truck_number"];
			$output['truck_owner_name'] = $row["truck_owner_name"];
			$output['truck_address_one'] = $row["truck_address_one"];
			$output['truck_address_two'] = $row["truck_address_two"];
			$output['truck_place'] = $row["truck_place"];
			$output['truck_mobile_number'] = $row["truck_mobile_number"];
			$output['truck_pan_number'] = $row["truck_pan_number"];
			$output['truck_bank_name'] = $row["truck_bank_name"];
			$output['truck_bank_acc_number'] = $row["truck_bank_acc_number"];
			$output['truck_bank_branch'] = $row["truck_bank_branch"];
			$output['truck_ifsc_code'] = $row["truck_ifsc_code"];
			$output['truck_aadhar_no'] = $row["truck_aadhar_no"];
			$output['truck_remarks'] = $row["truck_remarks"];
		}
		echo json_encode($output);
	}
}
