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

$kode = $_POST[kode];
$text	= "SELECT * FROM jabatan WHERE kode_jab='$kode'";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){	
	$r=mysql_fetch_assoc($sql);		
	$data['jabatan'] = $r['nama_jab'];
	echo json_encode($data);
}else{
	$data['jabatan']= '0001';
	echo json_encode($data);
}
?>