Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("config.php"); ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Pendaftaran Siswa Baru | SMK Coding</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
- </head>
- <style type="text/css">
- html,
- body {
- height: 100%;
- background-color: green;
- font-family: Poppins;
- justify-content: center;
- }
- </style>
- <body>
- <nav class="navbar navbar-expand-md navbar-light bg-light mb-4">
- <div class="container-fluid">
- <ul class="navbar-nav me-auto mb-2 mb-md-0">
- <li class="nav-item">
- <a class="nav-link active" aria-current="page" href="index.php">Home</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="form-daftar.php">Form Pendaftaran</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="list-siswa.php">List Pendaftar</a>
- </li>
- </ul>
- </div>
- </nav>
- <div class="container">
- <header>
- <h3 class="text-center mt-5">Siswa yang sudah mendaftar</h3>
- </header>
- <nav class="text-center">
- <a href="form-daftar.php">[+] Tambah Baru</a>
- </nav>
- <br>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th scope="col">No</th>
- <th scope="col">Nama</th>
- <th scope="col">Foto</th>
- <th scope="col">Alamat</th>
- <th scope="col">Jenis Kelamin</th>
- <th scope="col">Agama</th>
- <th scope="col">Sekolah Asal</th>
- <th scope="col">Tindakan</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $sql = "SELECT * FROM calon_mahasiswa";
- $query = mysqli_query($db, $sql);
- while($siswa = mysqli_fetch_array($query)){
- echo "<tr>";
- echo "<td>".$siswa['id']."</td>";
- echo "<td>".$siswa['nama']."</td>";
- echo "<td><img src='img/".$siswa['foto']."' width='100' height='100'></td>";
- echo "<td>".$siswa['alamat']."</td>";
- echo "<td>".$siswa['jenis_kelamin']."</td>";
- echo "<td>".$siswa['agama']."</td>";
- echo "<td>".$siswa['sekolah_asal']."</td>";
- echo "<td>";
- echo "<a href='form-edit.php?id=".$siswa['id']."'>Edit</a> | ";
- echo "<a href='hapus.php?id=".$siswa['id']."'>Hapus</a>";
- echo "</td>";
- echo "</tr>";
- }
- ?>
- </tbody>
- </table>
- <p>Total: <?php echo mysqli_num_rows($query) ?></p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment