-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathre.php
More file actions
58 lines (50 loc) · 1.76 KB
/
Copy pathre.php
File metadata and controls
58 lines (50 loc) · 1.76 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
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
//koneksi
include("konfig.php");
//memulai session
?>
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
</head>
<body>
<center>
<h2> Print Data HP</h2>
<hr />
</center>
<header class="masthead" style="background-color:#ffffff">
<div class="container " >
<table class="table text" >
<thead>
<tr>
<th scope="col">ID HP</th>
<th scope="col">merk</th>
<th scope="col">deskripsi</th>
<th scope="col">jumlah</th>
<th scope="col">harga</th>
</tr>
</thead>
<tbody>
<!-- berfungsi menampilkan data hp-->
<?php
$sql = "SELECT * FROM hp";
$query = mysqli_query($db, $sql);
while($hp = mysqli_fetch_array($query)){
echo "<tr>";
echo "<td class='id'>".$hp['id']."</td>";
echo "<td class='merk'>".$hp['merk']."</td>";
echo "<td class='deskripsi'>".$hp['deskripsi']."</td>";
echo "<td class='jumlah'>".$hp['jumlah']."</td>";
echo "<td class='harga'>".$hp['harga']."</td>";
echo "<td>";
echo "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</header>
</body>
</html>