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

$kode	= $_POST['kode'];
$text	= "SELECT * FROM karyawan WHERE nik= '$kode'";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);

if ($row>0){
while ($r=mysql_fetch_array($sql)){	
	$data['nama'] 	= $r[nama];
	$data['tglmasuk']= $r[tglmasuk];
	$data['kodejab']= $r[kode_jab];
	$data['jabatan']= $r[jabatan];	
	$data['alamat'] = $r[alamat];	
	$data['tplahir']= $r[tplahir];
	$data['tglahir']= $r[tglahir];
	$data['pendid'] = $r[pendidikan];
	$data['sex'] 	= $r[sex];
	$data['statkwn']= $r[status_kwn];
	$data['jmlanak']= $r[jml_anak];	
	$data['gapok'] 	= $r[gapok];
	$data['umak'] 	= $r[umak];
	$data['tunjab'] = $r[tunj_jab];		
	$data['akses']	= 1;
	echo json_encode($data);
}
}else{
	echo "Maaf, data tidak ada ditemukan.";
}
?>
