document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php include("config.php"); ?>
  2.  
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6.     <title>SMAN 1 GEDANGAN</title>
  7.     <link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.css">
  8.     <script type="text/javascript" src="/bootstrap/js/jquery.js"></script>
  9.     <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
  10.     <script type="text/javascript" src="ajax.js"></script>
  11. </head>
  12.  
  13. <body>
  14.     <table class="table table-bordered table-striped">
  15.  
  16. </header>
  17.     <br>
  18.     <nav>
  19.         <a onclick="daftar()">[+] Tambah Baru</a>
  20.     </nav>
  21.  
  22.     <br>
  23.     <select>
  24.         <option onclick="tampil()">Semua</option>
  25.     </select>
  26.  
  27.     <thead>
  28.         <tr>
  29.             <th>No</th>
  30.             <th>Nama</th>
  31.             <th>Alamat</th>
  32.             <th>Jenis Kelamin</th>
  33.             <th>Agama</th>
  34.             <th>Asal Sekolah</th>
  35.             <th>Tindakan</th>
  36.         </tr>
  37.     </thead>
  38.     <tbody>
  39.  
  40.         <?php
  41.         $sql = "SELECT * FROM ayodaftar";
  42.         $query = mysqli_query($db, $sql);
  43.         $nomor=0;
  44.         while($mhs = mysqli_fetch_array($query)){
  45.             echo "<tr>";
  46.             $nomor++;
  47.             echo "<td>".$nomor."</td>";
  48.             echo "<td>".$mhs[\'nama\']."</td>";
  49.             echo "<td>".$mhs[\'alamat\']."</td>";
  50.             echo "<td>".$mhs[\'jeniskl\']."</td>";
  51.             echo "<td>".$mhs[\'agama\']."</td>";
  52.             echo "<td>".$mhs[\'asalskl\']."</td>";
  53.  
  54.             echo "<td>";
  55.             echo "<a href=\'form_edit.php?id=".$mhs[\'id\']."\'>Edit</a> | ";
  56.             echo "<a href=\'hapus.php?id=".$mhs[\'id\']."\'>Hapus</a>";
  57.             echo "</td>";
  58.  
  59.             echo "</tr>";
  60.         }
  61.         ?>
  62.  
  63.     </tbody>
  64.     </table>
  65.  
  66.     <center><p>Total: <?php echo mysqli_num_rows($query) ?></p></center>
  67.  
  68.     </body>
  69. </html>
');