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

if($user==''){
  header("location:index.php");
}else{
  $sql = "insert into masterkpi (kpi,user,fok,foktan)values('K','$user','Fokus Keuangan','0')";
  $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");
}

?>
