<h2>Mahasiswa Himatif</h2>

<table class="table table-bordered">
	<thead>
		<tr>
			<th>No</th>
			<th>Username</th>
			<th>Password</th>
			<th>Nama</th>
			<th>Nim</th>
			<th>Kelas</th>
			<th>Angkatan</th>
			<th>Alamat</th>
			<th>Email Akademik</th>
			<th>Status Mahasiswa</th>
			<th>Tempat/Tanggal-Lahir</th>
			<th>Role</th>
			<th>Aksi</th>
		</tr>
	</thead>
	<tbody>
		<?php $nomor=1; ?>
		<?php $ambil=$koneksi->query("SELECT * FROM mahasiswa"); ?>
		<?php while($pecah = $ambil->fetch_assoc()){ ?>
		<tr>
			<td><?php echo $nomor; ?></td>
			<td><?php echo $pecah['username']; ?></td>
			<td><?php echo $pecah['password']; ?></td>
			<td><?php echo $pecah['nama']; ?></td>
			<td><?php echo $pecah['nim']; ?></td>
			<td><?php echo $pecah['angkatan']; ?></td>
			<td><?php echo $pecah['kelas']; ?></td>
			<td><?php echo $pecah['alamat']; ?></td>
			<td><?php echo $pecah['email_akademik'];?></td>
			<td><?php echo $pecah['status_mahasiswa']; ?></td>
			<td><?php echo $pecah['tempat_lahir'] ?>,<?php echo $pecah['tanggal_lahir']; ?> </td>
			<td><?php echo $pecah['role']; ?></td>			
			<td>
				<a href="index.php?halaman=ubahmahasiswa&id=<?php echo $pecah['mahasiswa_id']; ?>" class="btn btn-warning">Ubah</a>
				<a href="index.php?halaman=hapusmahasiswa&id=<?php echo $pecah['mahasiswa_id']; ?>" class="btn-danger btn">Hapus</a>
			</td>
		</tr>
		<?php $nomor++; ?>
		<?php }  ?>

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