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

$id = $_POST['id'];
$kpi = $_POST['kpi'];
$kode = $_POST['kode'];
$pola = $_POST['pola'];
$des = $_POST['des'];
$sat = $_POST['sat'];
$fok = $_POST['fok'];
$area = $_POST['area'];
$kodejab = $_POST['kodejab'];

/*
if($fok==''){
  $foktan = "0";
}

$sqld = "select * from masterkpi where fok='$fok' limit 1";
$resd = $conn->query($sqld);
while($d = $resd->fetch_assoc()){
  $foktan = $d['foktan'];
}
*/
$sql = "update masterkpi set kpi='$kpi',kode='$kode',pola='$pola',des='$des',sat='$sat',fok='$fok',area='$area',
kodejab='$kodejab',saverec='1' where id='$id'";
$res = $conn->query($sql);

?>
<script>
parent.kembalikan();
parent.keluar();
</script>
