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

$kode	= $_POST[kode];
$text	= "SELECT kode_kk,tanggal,nokas,namakas,penerima,sum(jumlah) as total FROM jurkk WHERE kode_kk= '$kode' GROUP BY kode_kk";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['tgl'] 	= $r[tanggal];
	$data['nokas']	= $r[nokas];
	$data['nakas']	= $r[namakas];
	$data['pener'] 	= $r[penerima];
	$data['total'] 	= $r[total];
	echo json_encode($data);
}
}else{
	$data['tgl']	= '';
	$data['nokas']	= '';
	$data['nakas']	= '';
	$data['pener']	= '';
	$data['total']	= '';
	echo json_encode($data);
}
?>