<html>
<head>
<title>Input Data dari Form ke MySQL</title>
</head>
<Body bgcolor='aqua'>
<body>
<?php
$nama = $_POST['nama'];
$pesan = $_POST['pesan'];
$conn = mysql_connect("localhost","root","");
if (!$conn) {
echo "Could not connect to db";
exit(1);
}
$db = mysql_select_db("latihan",$conn);
$sqlText = "insert into bukutamu(nama, pesan,tanggal)
values('$nama','$pesan',NOW(''))";
mysql_query($sqlText);
?>
<b>Buku Tamu -</b> <a href=lihat.php><b>Lihat Isi Buku Tamu</b></a><br />
</body>
</html>
Selasa, 10 Maret 2009
Diposting oleh forlan di 23.51
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar