<?php
require('../config/dbcon.php');
if (isset($_POST["id"])) {
	$output = array();
	$query = "SELECT * FROM disc_mst WHERE id =" . $_POST["id"] . "";
	if (mysqli_query($connect, $query)) {
		$result = mysqli_query($connect, $query);
		while ($row = mysqli_fetch_array($result)) {
			$output['customer_code'] = $row["customer_code"];
			$output['customer_name'] = $row["customer_name"];			
			$output['cust_place'] = $row["cust_place"];
			$output['segment'] = $row["segment"];
			$output['disc_per'] = $row["disc_per"];			
		}
		echo json_encode($output);
	}
}
