;
;

Selasa, 08 Desember 2009

FesB00k Status dengan PHP

Posted on 18.02 by AssLab Community

Buat Database : status Buat Tabel : facebook Buat File dengan nama : status.php <html> <head> <title>www.fesb00k.com</title> </head> <body bgcolor=lightgreen> <pre> <b>www.fesb00k.com</b><br> <i>Kamu bisa buat status disini !!!</i> <form name="form1" method="post" action="update.php"> Nama Kamu : <input name="nama" type="text" size="15" /> Status : <textarea name="status" cols="13" rows="3"></textarea> <input type="submit" name="Submit" value="Update" /><input type="reset" name="Submit2" value="Ga Jadi" /> </form> </pre> </body> </html> Buat lagi file dengan nama : update.php <html> <head><title>Update Status</title></head> <body bgcolor=lightgreen> <pre> <?php $konek = mysql_connect("localhost", "root", "password"); mysql_select_db("status", $konek); $nm=$nama; $st=$status; $jam=date("H:i:s"); $simpan = "INSERT INTO facebook (nama ,jam, status) VALUES ('$nm','$jam','$st')"; $hasil = mysql_query($simpan); if ($hasil) { echo "<b>www.fesb00k.com</b><br>"; echo "<a href=status.php><b><i>Update Status Terbaru ...!!!</i></b></a><br>"; $lihat = "SELECT * FROM facebook ORDER BY jam DESC"; $hasil = mysql_query($lihat); while ($isi = mysql_fetch_array($hasil)) { echo (" <b>$isi[jam]</b> status @ <b> $isi[nama] </b> : <i> $isi[status] </i> "); } } else { echo "Waah Sorry banget, Server error ...!!!!"; } ?> </pre> </body> </html>

No Response to "FesB00k Status dengan PHP"

Leave A Reply