-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduk.php
44 lines (39 loc) · 1.61 KB
/
produk.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
<div class="row justify-content-between">
<div class="col-10"><b>Produk </b></div>
<div class="col-2 d-flex justify-content-end align-items-end">
<button class="btn btn-dark btn-sm" type="button">add</button>
</div>
</div>
<hr>
<table class="table table-sm border border-dark">
<thead class="thead-dark">
<tr>
<th scope="col" width="5%">No</th>
<th scope="col">Nama</th>
<th scope="col">Kategori</th>
<th scope="col">Harga</th>
<th scope="col">Gambar</th>
<th scope="col" width="12%">Aksi</th>
</tr>
</thead>
<tbody>
<?php
$que = "SELECT * FROM produk
JOIN kategori ON produk.id_produk=kategori.id_kategori";
$select = mysqli_query($con, $que);
while($data = mysqli_fetch_array($select)){
?>
<tr>
<th scope="row"><?php echo $data['id_produk']; ?></th>
<td><?php echo $data['nama_produk']; ?></td>
<td><?php echo $data['nama_kategori']; ?></td>
<td><?php echo $data['harga']; ?></td>
<td><?php echo $data['gambar']; ?></td>
<td>
<button class="btn btn-dark btn-sm" type="button">edit</button>
<button class="btn btn-dark btn-sm" type="button">delete</button>
</td>
</tr>
<?php } ?>
</tbody>
</table>