Advertisement
kasyfunnur

Untitled

Dec 21st, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. <?php
  2.     include "koneksi.php" ;
  3. ?>
  4. <html>
  5.     <head>
  6.         <link rel="stylesheet" href="index.css">
  7.         <title>Sisa</title>
  8.     </head>
  9.     <body>
  10.         <header>
  11.             <h1>Coba di cek dulu</h1>
  12.         </header>
  13.         <nav>
  14.             <ul>
  15.                 <a href="#"><li>Home</li></a>
  16.                 <a href="#"><li>About</li></a>
  17.                 <a href="#"><li>Blog</li></a>
  18.                 <a href="#"><li>Shop</li></a>
  19.                 <a href="#"><li>Galery</li></a>
  20.             </ul>
  21.         </nav>
  22.         <section>
  23.             <h1>disini isinya</h1>
  24.             <?php
  25.                 $query = " SELECT * FROM `berita`" ;
  26.                 $sql = mysql_query($query) ;
  27.                     while ($hasil = mysql_fetch_array($sql))
  28.                         {
  29.                             $id_berita = $hasil['id_berita'] ;
  30.                             $judul = stripslashes($hasil['judul']) ;
  31.                             $headline = nl2br(stripslashes($hasil['headline'])) ;
  32.                             $pengirim = stripslashes($hasil['pengirim']) ;
  33.                             $tanggal = stripslashes($hasil['tanggal']) ;
  34.                            
  35.                             echo "<font size=4><a href='berita_lengkap.php?id=$id_berita'>$judul</a></font><br>" ;
  36.                             echo "berita dikirim oleh <b> $pengirim </b> pada tanggal <b> $tanggal </b>" ;
  37.                             echo "<p>$headline</p>" ;
  38.                             echo "<hr>" ;
  39.                         }
  40.             ?>
  41.         </section>
  42.     </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement