<?php
include("sess_check.php");

$tahun_ajaran = $_POST['tahun_ajaran'];
$keterangan_masuk = $_POST['keterangan_masuk'];

$sql = "INSERT INTO masuk(tahun_ajaran,keterangan_masuk)VALUES('$tahun_ajaran','$keterangan_masuk')";
$ress = mysqli_query($conn, $sql);
if ($ress) {
	echo "<script>alert('Tambah Tahun Ajaran Berhasil!');</script>";
	echo "<script type='text/javascript'> document.location = 'tahun.php'; </script>";
} else {
	echo ("Error description: " . mysqli_error($conn));
	echo "<script>alert('Ops, terjadi kesalahan. Silahkan coba lagi.');</script>";
	echo "<script type='text/javascript'> document.location = 'tahun_tambah.php'; </script>";
}
