Demo entry 6745688

btn_tambah

   

Submitted by anonymous on May 27, 2018 at 15:33
Language: PHP. Code size: 431 Bytes.

<?php
	$koneksi = mysqli_connect('localhost','root','','buku');
	if(isset($_POST['btn_tambah'])){
		$judul = $_POST['judul'];
		$pengarang = $_POST['pengarang'];
		$tahun = $_POST['tahun'];
		$harga = $_POST['harga'];
		$foto = $_POST['foto'];

		$masuk = mysqli_query($koneksi, "INSERT INTO daftar VALUES('','$foto','$judul','$pengarang','$tahun','$harga')");

	if($masuk){
		header('Location:index.php');
		}
	}
?>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).