You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysqli_query($conn,"insert into peminjaman (id_siswa, tanggal_peminjaman, tanggal_kembali) value ('".$_SESSION['id_siswa']."','".date('Y-m-d')."','".$tgl_harus_kembali."')");
$id=mysqli_insert_id($conn);
foreach ($cart as $key_produk => $val_produk) {
mysqli_query($conn,"insert into detail_peminjaman (id_peminjaman, id_buku, qty) value ('".$id['id_peminjaman']."','".$val_produk['id_buku']."','".$val_produk['qty']."')");
}
unset($_SESSION['cart']);
echo '<script>alert("Success to checkout");location.href="history.php"</script>';