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. <nav class="navbar navbar-expand-md navbar-light bg-light mb-4">
  25. <div class="container-fluid">
  26. <ul class="navbar-nav me-auto mb-2 mb-md-0">
  27. <li class="nav-item">
  28. <a class="nav-link active" aria-current="page" href="index.php">Home</a>
  29. </li>
  30. <li class="nav-item">
  31. <a class="nav-link" href="form-daftar.php">Form Pendaftaran</a>
  32. </li>
  33. <li class="nav-item">
  34. <a class="nav-link" href="list-siswa.php">List Pendaftar</a>
  35. </li>
  36. </ul>
  37. </div>
  38. </nav>
  39. <div class="container">
  40. <header>
  41. <h3 class="text-center mt-5">Siswa yang sudah mendaftar</h3>
  42. </header>
  43.  
  44. <nav class="text-center">
  45. <a href="form-daftar.php">[+] Tambah Baru</a>
  46. </nav>
  47.  
  48. <br>
  49.  
  50. <table class="table table-bordered">
  51. <thead>
  52. <tr>
  53. <th scope="col">No</th>
  54. <th scope="col">Nama</th>
  55. <th scope="col">Foto</th>
  56. <th scope="col">Alamat</th>
  57. <th scope="col">Jenis Kelamin</th>
  58. <th scope="col">Agama</th>
  59. <th scope="col">Sekolah Asal</th>
  60. <th scope="col">Tindakan</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <?php
  65. $sql = "SELECT * FROM calon_mahasiswa";
  66. $query = mysqli_query($db, $sql);
  67. while($siswa = mysqli_fetch_array($query)){
  68. echo "<tr>";
  69. echo "<td>".$siswa['id']."</td>";
  70. echo "<td>".$siswa['nama']."</td>";
  71. echo "<td><img src='img/".$siswa['foto']."' width='100' height='100'></td>";
  72. echo "<td>".$siswa['alamat']."</td>";
  73. echo "<td>".$siswa['jenis_kelamin']."</td>";
  74. echo "<td>".$siswa['agama']."</td>";
  75. echo "<td>".$siswa['sekolah_asal']."</td>";
  76. echo "<td>";
  77. echo "<a href='form-edit.php?id=".$siswa['id']."'>Edit</a> | ";
  78. echo "<a href='hapus.php?id=".$siswa['id']."'>Hapus</a>";
  79. echo "</td>";
  80. echo "</tr>";
  81. }
  82. ?>
  83. </tbody>
  84. </table>
  85. <p>Total: <?php echo mysqli_num_rows($query) ?></p>
  86. </div>
  87. </body>
  88. </html>
');