<?php
include "../koneksi.php";

$nis          = $_POST['nis'];
$nama         = $_POST['nama'];
$jenis_kelamin          = $_POST['jenis_kelamin'];
$alamat       = $_POST['alamat'];
$id_kelas     = $_POST['id_kelas'];
$tahun_masuk  = $_POST['tahun_masuk'];

$query = "
INSERT INTO santri 
(nis, nama, jenis_kelamin, alamat, id_kelas, tahun_masuk)
VALUES
('$nis','$nama','$jenis_kelamin','$alamat','$id_kelas','$tahun_masuk')
";

mysqli_query($conn, $query) or die("INSERT GAGAL: ".mysqli_error($conn));

header("Location: santri.php");
exit;
