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

$kode = $_POST[kode];
$text	= "SELECT * FROM piutang WHERE nofak= '$kode' ORDER BY nofak";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){		
	$data['jumlah']=$r[jumlah];
	$data['tglfak']=$r[tanggal];
	echo json_encode($data);
}
}else{		
	$data['jumlah']='';
	$data['tglfak']='';
	echo json_encode($data);
}
?>