Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi.php" ;
- ?>
- <html>
- <head>
- <link rel="stylesheet" href="index.css">
- <title>Sisa</title>
- </head>
- <body>
- <header>
- <h1>Coba di cek dulu</h1>
- </header>
- <nav>
- <ul>
- <a href="#"><li>Home</li></a>
- <a href="#"><li>About</li></a>
- <a href="#"><li>Blog</li></a>
- <a href="#"><li>Shop</li></a>
- <a href="#"><li>Galery</li></a>
- </ul>
- </nav>
- <section>
- <h1>disini isinya</h1>
- <?php
- $query = " SELECT * FROM `berita`" ;
- $sql = mysql_query($query) ;
- while ($hasil = mysql_fetch_array($sql))
- {
- $id_berita = $hasil['id_berita'] ;
- $judul = stripslashes($hasil['judul']) ;
- $headline = nl2br(stripslashes($hasil['headline'])) ;
- $pengirim = stripslashes($hasil['pengirim']) ;
- $tanggal = stripslashes($hasil['tanggal']) ;
- echo "<font size=4><a href='berita_lengkap.php?id=$id_berita'>$judul</a></font><br>" ;
- echo "berita dikirim oleh <b> $pengirim </b> pada tanggal <b> $tanggal </b>" ;
- echo "<p>$headline</p>" ;
- echo "<hr>" ;
- }
- ?>
- </section>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement