-
Notifications
You must be signed in to change notification settings - Fork 0
/
jeniskopi.php
56 lines (55 loc) · 1.65 KB
/
jeniskopi.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</!DOCTYPE html>
<html>
<head>
<?php include ('partials/head.php'); ?>
</head>
<body>
<?php include ('partials/menu.php'); ?>
<div class="container">
<div class="card">
<h2>Tambah Jenis Kopi</h2><hr>
<form action="tambahkopi.php" method="POST">
<label>Nama Kopi : </label>
<input type="text" name="nama" placeholder="Masukkan Nama Kopi" required><br>
<label>Harga : </label>
<input type="text" name="harga" placeholder="Masukkan Harga Kopi" required><br>
<div class="card-button">
<input type="submit" name="submit" value="Simpan" class="simpan">
<input type="reset" name="reset" value="Reset" class="reset">
<!-- <button type="button" onclick="history.back(-1)" class=" btn btn-sm btn-secondary text-light mb-1">Batal</button> -->
</div>
</form>
</div>
<div class="card">
<h2>Jenis Kopi</h2><hr>
<table>
<thead>
<tr>
<th>Jenis Kopi</th>
<th>Harga</th>
<th>Stok</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$tampil=mysqli_query($dbc,"SELECT * FROM kopi");
while($row=mysqli_fetch_array($tampil)){
?>
<tr>
<td><?php echo $row['nama']; ?></td>
<td>Rp.<?php echo $row['hargakopi']; ?></td>
<td><?php echo $row['stok']; ?></td>
<td>
<a href="<?php echo 'tambahstok.php?id='.$row['idkopi']; ?>" >Tambah Stok</a>
<a href="<?php echo 'editkopi.php?id='.$row['idkopi']; ?>" >Edit</a>
<a href="<?php echo 'hapuskopi.php?id='.$row['idkopi']; ?>" onclick="return confirm('Apakah anda yakin akan menghapus data ini?')">Hapus</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</body>
</html>