
<?php
/*error_reporting(0);*/
include('../koneksi.php');
if (isset($_GET['rekening']) AND isset($_GET['tgl'])){
$rekening = $_POST['rekening'];
}
$tgl          = date('Y-m-d',strtotime($_POST['tgl']));
$username     = $_SESSION['username'];
$kode         = $_SESSION['kode'];
$cekrek     = substr($_POST['rekening'],15,2);
$rekening     = $_POST['rekening'];
$kodetab     = $_POST['kodetab'];
$asuransi     = $_POST['asuransi'];

if($cekrek == "" || strlen($rekening) <= 15 || $kodetab==""||$tgl==""||$username==""){
	echo "<script type='text/javascript'>alert('Data Masih ada yang kosong / Salah... !');
window.location = '../home.php?home=e2160291e45e35a256062c679ab2ed0c';
</script>";
}elseif($cekrek=="00"||$kodetab=="0"||$tgl=="0"||$username=="0"){
	echo "<script type='text/javascript'>alert('Data Masih ada yang kosong...!');
window.location = '../home.php?home=e2160291e45e35a256062c679ab2ed0c';
</script>";
	}else{

$query = mysqli_query($koneksi,"INSERT INTO bukutabungan SET tgl='$tgl',rekening='$rekening',kodetab='$kodetab',asuransi='$asuransi',tutup='0',blokir='0',username='$username' ")or die(mysqli_error($koneksi));
//location.reload(); 
 
 echo "<script type='text/javascript'>alert('Data Yang Bpk input Berhasil');
window.location = '../home.php?home=e2160291e45e35a256062c679ab2ed0c';
</script>";  
 
} 


?>
