<?php
	include 'koneksi.php';

	$nama_pengirim = $_POST['nama_pengirim'];
	$email = $_POST['email'];
	$komentar = $_POST['komentar'];

	$query = mysqli_query($koneksi, "INSERT INTO t_komentar VALUES('', '$nama_pengirim', '$email','$komentar', NOW())");
	if ($query) {
		echo "<script>alert('Terimakasih $nama_pengirim telah memberikan sarannya !'); window.location = 'index.php'</script>";
	}else{
		echo "<script>alert('$nama_pengirim gagal menginput saran !'); window.location = 'contact.php'</script>";
	}
?>