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

$kode	= $_POST[kode];
$text	= "SELECT kode_ppi,tanggal,kode_pl,nama_pl FROM jurppi WHERE kode_ppi= '$kode' GROUP BY kode_ppi";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['tgl']   = $r[tanggal];
	$data['kodepl']= $r[kode_pl];
	$data['namapl']= $r[nama_pl];
	echo json_encode($data);
}
}else{
	$data['tgl']   = '';
	$data['kodepl']= '';
	$data['namapl']= '';
	echo json_encode($data);
}
?>