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