<h2>Periode Himatif</h2>

<table class="table table-bordered">
	<thead>
		<tr>
			<th>No</th>
			<th>Periode Awal</th>
			<th>Periode Akhir</th>
			<th>Status</th>
			<th>Aksi</th>
		</tr>
	</thead>
	<tbody>
		<?php $nomor=1; ?>
		<?php $ambil=$koneksi->query("SELECT * FROM periode"); ?>
		<?php while($pecah = $ambil->fetch_assoc()){ ?>
		<tr>
			<td><?php echo $nomor; ?></td>
			<td><?php echo $pecah['periode_awal']; ?></td>
			<td><?php echo $pecah['periode_akhir']; ?></td>
			<td><?php echo $pecah['status']; ?></td>
			<td>
				<a href="index.php?halaman=hapusperiode&id=<?php echo $pecah['periode_id']; ?>" class="btn-danger btn">Hapus</a>
				<a href="index.php?halaman=ubahperiode&id=<?php echo $pecah['periode_id']; ?>" class="btn btn-warning">Ubah</a>
			</td>
		</tr>
		<?php $nomor++; ?>
		<?php }  ?>

	</tbody>
	
</table>
<a href="index.php?halaman=tambahperiode" class="btn btn-primary">Tambah Periode</a>