<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];
$text	= "SELECT *	FROM supplier WHERE kode_sp= '$kode'";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){		
	$data['kode']		= $r[kode_sp];
	$data['tnama']		= $r[nama];	
	$data['talamat']	= $r[alamat];
	$data['ttelepon']	= $r[telepon];
	$data['tfax']			= $r[fax];
	$data['tbank']		= $r[bank];
	$data['nomorac']	= $r[nomor_ac];
	$data['namaac']	= $r[nama_ac];
	$data['tkontak']	= $r[kontak];	
	$data['akses']	= 1;
	echo json_encode($data);
}
}
?>