<?
session_start();
include"../plg/ses.php";
include"../plg/kon.php";
//$user;
//echo "tesss";

if($user==''){
  header("location:index.php");
}
else{
  $sql = "insert into masterkpi (kpi,fok,foktan,user)values('K','Fokus Keuangan','1','$user')";
  $res = $conn->query($sql);

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

?>
