-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomeCRUD.php
More file actions
45 lines (40 loc) · 1.16 KB
/
homeCRUD.php
File metadata and controls
45 lines (40 loc) · 1.16 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>select Table</title>
</head>
<body>
<table>
<tr>
<td>ID</td>
<td>Nama Produk</td>
<td>Harga</td>
<td>Aksi</td>
</tr>
<?php
include "koneksi.php";
$query = "select * from product";
$result = mysqli_query($connect, $query);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $row["id"]; ?></td>
<td><?php echo $row["product_nama"]; ?></td>
<td><?php echo $row["harga"]; ?></td>
<td><img class="gmbr" src="<?php echo $row["lokasi_foto"]; ?> "></td>
<td>
<a href="editForm.php?id=<?php echo $row["id"]; ?>">EDIT</a>
<a href="hapus.php?id=<?php echo $row["id"]; ?>">DELETE</a>
</td>
</tr>
<?php
}
} else {
echo "0 results";
}
?>
</table>
</body>
</html>