-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.php
More file actions
42 lines (34 loc) · 762 Bytes
/
list.php
File metadata and controls
42 lines (34 loc) · 762 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Basic CRUD</title>
</head>
<body>
<?php
require 'config.php'; // include file connect to db
include 'menu.php'; //include menu list from menu.php, you may edit accordingly
$sql = "SELECT * FROM pelanggan";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Name</th>
<th>Bapa</th>
</tr>";
while($row = $result->fetch_assoc()) {
echo "<tr>
<td> ". $row["idPelanggan"]. " </td>
<td> ". $row["namaSendiri"]. " </td>
<td> ". $row["namaBapa"]. "</td>
</tr>";
}
} else {
echo "0 results";
}
$conn->close();
include 'footer.php';
?>
</body>
</html>