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

$sql = "insert into karyawan (nip,nama,jab,unit,lokasi,user)values('','','','','','$user')";
$res = $conn->query($sql);

$sql1 = "select * from karyawan order by id desc limit 1";
$res1 = $conn->query($sql1);
while($a = $res1->fetch_assoc()){
  $id = $a['id'];
}
//header("location:formeditkar.php?id=$id");
echo "<script>location.href='formeditkar.php?id=$id';</script>";

?>
