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

$kode	= $_POST['kode'];
$text	= "SELECT kode_ppi,tanggal,kode_pl,nama_pl,kode_cab 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['namapl']= $r['nama_pl'];
	$data['kodepl']= $r['kode_pl'];
	$data['kodecab']= $r['kode_cab'];
	echo json_encode($data);
}
}else{
	$data['tgl']= '';
	$data['namapl']= '';
	$data['kodepl']= '';
	$data['kodecab']= '';
	echo json_encode($data);
}
?>