18 Februari 2009

Cara membuat buku tamu

Contoh Buku Tamu:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Buku tamu</TITLE>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">

<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>

<BODY>

<STYLE type=text/css>BODY {

BACKGROUND-IMAGE: url(backgroung.jpg)

}

</STYLE>

<B><I><FONT size=5>Buku Tamu </FONT></B></I>- <A

href="file:///F:/lihat.php"><FONT color=green size=4>lihat isi buku

tamu</FONT></A><BR><BR>

<HR>

<FONT color=brown><B><I>Mohon isi data diri dan pesan anda disini

:</I></B></FONT><BR><BR><BR>

<FORM id="form1? name=" action=isi.php method=post form1?><U><B>NAMA</B></U>

<INPUT id=nama name=nama> <BR><BR><U><B>PESAN</B></U> <TEXTAREA id=pesan name=pesan cols=45 5?></TEXTAREA> <BR><BR>

<HR>

<INPUT id=Submit type=submit value=Submit name=Submit> </FORM></BODY></HTML>

Isi buku tamu

<html>

<head>

<title>Data dari buku tamu</title>

</head>

<body>

<style type="text/css">

body{background-image:url(1_824047706l.jpg)}

</style>

<?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);

?>

<font size=5><font color=blue>Buku tamu - <a href=lihat.php><b>lihat isi buku tamu</b></a></font><br/>

</body>

</html>

Data dari isi buku tamu

<html>

<head>

<title>Daftar Data yang ada di MySQL</title>

</head>

<body bgcolor="#000000">

<a href=bukutamu.php><font size=5>Isi Buku Tamu</font></a><br />

<font color="#FFF000" size="3"><b>Isi buku tamu</b><br />

<br />

<?php

$conn = mysql_connect("localhost","root","");

if (!$conn) {

echo "Could not connect to db";

exit(1);

}

$db = mysql_select_db("latihan",$conn);

$sqlText = "select * from bukutamu";

$result = mysql_query($sqlText);

while($row=mysql_fetch_object($result))

{

?>

<strong>Nama</strong>: <?php echo $row->Pedrosa van krapyak<br />

<strong>Pesan</strong>: <?php echo $row->kritik dan saran kunjungi:elsiteempire.blogspot.com<br />

<br />

<?php } ?>

<marquee>

---

</marquee>

</font> <font color="#FF0000">

<marquee>

</marquee>

</font>

<marquee>

<font color="#FF0000" size="6">permisi... <img src="TAZBBALL.gif"> numpang lewat!!!

</font>----

</marquee>

</body>

</html>

Tidak ada komentar:

My Shoutbox

Name :
Web URL :
Message :
:) :( :D :p :(( :)) :x