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

$sql = "insert into dbkpi (kode,kpides,pola,sat,vol,kua)values('','','','0','0','0')";
$res = $conn->query($sql);

$sql1 = "select * from dbkpi order by kode asc limit 1";
$res1 = $conn->query($sql1);
while($a = $res1->fetch_assoc()){
  $id = $a['kode'];
}

header("location:formeditkpi.php?kode=$id");
?>
