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

$nama = $_POST['nama_peminjam'];
$email = $_POST['email'];
$telfon = $_POST['no_telp'];
$idbuku = $_POST['id_buku'];

if (mysqli_query($koneksi, "INSERT INTO peminjam VALUES(NULL, '$nama', '$email', '$telfon', '$idbuku')")) {
    header('Location: ../peminjam.php?alert=Berhasil');
} else {
    header('Location: ../peminjam.php?alert=gagal');
}
exit();
?>
