Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("config.php"); ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Pengisian Data Prestasi Siswa | SMAN 1 Tanjung</title>
- </head>
- <body>
- <header>
- <h3>Data Prestasi Siswa</h3>
- </header>
- <nav>
- <a href="form-daftar.php">[+] Tambah Baru</a>
- </nav>
- <br>
- <table border="1">
- <thead>
- <tr>
- <th>No</th>
- <th>Nama Siswa</th>
- <th>Kelas</th>
- <th>Semester ke</th>
- <th>Jenis Prestasi</th>
- <th>Keterangan</th>
- <th>Aksi</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $sql = "SELECT * FROM prestasi_siswa";
- $query = mysqli_query($db, $sql);
- while($siswa = mysqli_fetch_array($query)){
- echo "<tr>";
- echo "<td>".$siswa['no']."</td>";
- echo "<td>".$siswa['nama_siswa']."</td>";
- echo "<td>".$siswa['kelas']."</td>";
- echo "<td>".$siswa['semester_ke']."</td>";
- echo "<td>".$siswa['jenis_prestasi']."</td>";
- echo "<td>".$siswa['keterangan']."</td>";
- echo "<td>";
- echo "<a href='form-edit.php?id=".$siswa['no']."'>Edit</a> | ";
- echo "<a href='hapus.php?id=".$siswa['no']."'>Hapus</a>";
- echo "</td>";
- echo "</tr>";
- }
- ?>
- </tbody>
- </table>
- <p>Total: <?php echo mysqli_num_rows($query) ?></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment