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>Pendaftaran Siswa Baru | SMK Coding</title>
  7.     <meta charset="UTF-8">
  8.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  10.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  11.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  12.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  13. </head>
  14. <style type="text/css">
  15.         html,
  16.         body {
  17.            height: 100%;
  18.             background-color: green;
  19.              font-family: Poppins;
  20.             justify-content: center;
  21.         }
  22.     </style>
  23. <body>
  24.     <div class="container">
  25.         <header>
  26.             <h3 class="text-center mt-5">Siswa yang sudah mendaftar</h3>
  27.         </header>
  28.  
  29.         <nav class="text-center">
  30.             <a href="form-daftar.php">[+] Tambah Baru</a>
  31.         </nav>
  32.  
  33.         <br>
  34.  
  35.         <table class="table table-bordered">
  36.             <thead>
  37.                 <tr>
  38.                     <th scope="col">No</th>
  39.                     <th scope="col">Nama</th>
  40.                     <th scope="col">Alamat</th>
  41.                     <th scope="col">Jenis Kelamin</th>
  42.                     <th scope="col">Agama</th>
  43.                     <th scope="col">Sekolah Asal</th>
  44.                     <th scope="col">Tindakan</th>
  45.                 </tr>
  46.             </thead>
  47.             <tbody>
  48.                 <?php
  49.                 $sql = "SELECT * FROM calon_mahasiswa";
  50.                 $query = mysqli_query($db, $sql);
  51.                 while($siswa = mysqli_fetch_array($query)){
  52.                     echo "<tr>";
  53.                     echo "<td>".$siswa[\'id\']."</td>";
  54.                     echo "<td>".$siswa[\'nama\']."</td>";
  55.                     echo "<td>".$siswa[\'alamat\']."</td>";
  56.                     echo "<td>".$siswa[\'jenis_kelamin\']."</td>";
  57.                     echo "<td>".$siswa[\'agama\']."</td>";
  58.                     echo "<td>".$siswa[\'sekolah_asal\']."</td>";
  59.                     echo "<td>";
  60.                     echo "<a href=\'form-edit.php?id=".$siswa[\'id\']."\'>Edit</a> | ";
  61.                     echo "<a href=\'hapus.php?id=".$siswa[\'id\']."\'>Hapus</a>";
  62.                     echo "</td>";
  63.                     echo "</tr>";
  64.                 }
  65.                 ?>
  66.             </tbody>
  67.         </table>
  68.         <p>Total: <?php echo mysqli_num_rows($query) ?></p>
  69.     </div>
  70. </body>
  71. </html>
');