<?
session_start();
include"../plg/ses.php";
include"../plg/kon.php";

$id = $_POST['id'];
$nip = $_POST['nip'];
$namam = ($_POST['nama']);
$bos = ($_POST['bos']);
$namax = addslashes($namam);
$unit = $_POST['unit'];
$jab = $_POST['jab'];
$lok = $_POST['lok'];
$kodejab = $_POST['kodejab'];

$sql = "update karyawan set nama='$namax',bos='$bos',nip='$nip',unit='$unit',jab='$jab',kodejab='$kodejab',lokasi='$lok',saverec='1' where id='$id'";
$res = $conn->query($sql);

$sql2 = "update kpikar set nama='$namax',unit='$unit',jab='$jab',lok='$lok' where nip='$nip' and kunci='Belum'";
$res2 = $conn->query($sql2);
?>
<script>
parent.keluar();
parent.kembalikan();
</script>
