<?php
	session_start();
	include 'koneksi.php';
		$user 	 = $_POST['id_user'];	
		$buku	 = $_POST['isbn'];
		$total 	 = $_POST['total'];

		$tambah = mysqli_query($koneksi, "INSERT INTO t_pemesanan VALUES('$buku', '$user', '$total', NOW())");
		
		if($tambah) {
			echo "<script>alert('Data pesanan berhasil disimpan'); window.location = 'savebook.php'</script>";
		}
		else {
			echo "<script>alert('Gagal menyimpan pesanan !'); window.location = 'checkout.php'</script>";
		}			
	
?>