<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];

$sql 	= mysql_query("SELECT *	FROM customer WHERE kode_pl= '$kode'");
$row	= mysql_num_rows($sql);
if ($row>0){
	$r=mysql_fetch_assoc($sql);
	$data['nama']	 = $r[nama];	
	$data['alamat']	 = $r[alamat];
	$data['umurpiut']= $r[umur_piut];
	echo json_encode($data);
}else{
	$data['nama']	 = '';
	$data['alamat']	 = '';
	$data['umurpiut']= '';
	echo json_encode($data);
}
?>