Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. include 'koneksi.php';
  3. // menyimpan data kedalam variabel
  4. $loker_buku=$_POST['loker_buku'];
  5. $rak=$_POST['no_rak'];
  6. $laci=$_POST['no_laci'];
  7. $boks=$_POST['no_boks'];
  8. $judulbuku=$_POST['judul_buku'];
  9. $pengarang=$_POST['nama_pengarang'];
  10. $tahun_terbit=$_POST['tahun_terbit'];
  11. $penerbit=$_POST['penerbit'];
  12. $penerima=$_POST['penerima'];
  13. $status=$_POST['status'];
  14. $ket=$_POST['keterangan'];
  15. // query SQL untuk insert data
  16. $sql="INSERT INTO buku VALUES (null,'".$loker_buku."','".$rak."','".$laci."','".$boks."','".$judulbuku."','".$pengarang."','".$tahun_terbit."','".$penerima."','".$penerbit."','".$status."','".$ket."')";
  17. mysqli_query($connect, $sql);
  18. // mengalihkan ke halaman index.php
  19. //header("location:index.php");
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement