<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];
$text	= "SELECT * FROM supplier WHERE kode_sp= '$kode' ORDER BY kode_sp";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['namasup']= $r['nama'];	
	echo json_encode($data);
}
}else{
	$data['namasup']= '';	
	echo json_encode($data);
}
?>