<?php
include "../../inc/inc.koneksi.php";

$kode	= $_POST[kode];
$text	= "SELECT * FROM faktur_pb WHERE kode_pb= '$kode' GROUP BY kode_pb";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['tgl']	= $r[tanggal];
	$data['nomorfk']= $r[nomor_fk];
	$data['namasup']= $r[nama_sup];
	echo json_encode($data);
}
}else{
	$data['tgl']	= '';
	$data['nomorfk']= '';
	$data['namasup']= '';
	echo json_encode($data);
}
?>