NIM_E31220577/admin/gejaladaftar.php

46 lines
2.2 KiB
PHP

<div class="d-sm-flex align-items-center justify-content-between mb-4">
<a href="index.php?halaman=gejalatambah" class="btn btn-sm btn-primary shadow-sm float-right pull-right">
<i class="fas fa-plus fa-sm text-white-50"></i> Tambah Gejala
</a>
</div>
<div class="row">
<div class="col-md-12 mb-4">
<div class="card shadow mb-4">
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold ">Data Gejala</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="table">
<thead class="bg-white text-dark">
<tr>
<th>No</th>
<th>Kode</th>
<th>Nama Gejala</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php $nomor = 1; ?>
<?php $ambil = $koneksi->query("SELECT * FROM gejala "); ?>
<?php while ($data = $ambil->fetch_assoc()) { ?>
<tr>
<td><?php echo $nomor ?></td>
<td><?php echo $data["kodegejala"] ?></td>
<td><?php echo $data["gejala"] ?></td>
<td>
<a href="index.php?halaman=gejalaedit&id=<?php echo $data['idgejala']; ?>" class="btn btn-warning btn-sm m-1">Ubah</a>
<a href="index.php?halaman=gejalahapus&id=<?php echo $data['idgejala']; ?>" class="btn btn-danger btn-sm m-1" onclick="return confirm('Apakah Anda Yakin Ingin Menghapus Data ?')">Hapus</a>
</td>
</tr>
<?php $nomor++; ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>