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

$sql = mysql_query("SELECT * FROM salesman WHERE kode_sl= '$kode' ORDER BY kode_sl");
$r	 = mysql_fetch_assoc($sql);
$data['namasl'] = $r[nama];
$data['unit'] 	= $r[unit];
echo json_encode($data);
?>