-
Notifications
You must be signed in to change notification settings - Fork 0
/
tampil_user.php
58 lines (57 loc) · 1.83 KB
/
tampil_user.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
57
58
<?php
include "header.php";
?>
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384- 0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7 AMvyTG2x" crossorigin="anonymous">
<title></title>
</head>
<body>
<ul>
<br>
<h3>
<center><small class="display-6">TAMPIL USER</small></center>
</h3>
<br>
<table class="table table-hover table-striped">
<thead>
<tr>
<th>NO</th>
<th>NAMA</th>
<th>USERNAME</th><th>PASSWORD</th><th>ROLE</th>
<th>AKSI</th>
</tr>
</thead>
<tbody>
<?php
include "koneksi.php";
$qry_user=mysqli_query($conn,"select * from user");
$no=0;
while($data_user=mysqli_fetch_array($qry_user)){
$no ;?>
<tr><td><?=$no?></td>
<td><?=$data_user['nama']?></td>
<td><?=$data_user['username']?></td>
<td><?=$data_user['password']?></td>
<td><?=$data_user['role']?></td>
<td><a href="ubah_user.php?id=<?=$data_user['id']?>"
class="btn btn-success">Ubah</a> |
<a href="hapus_user.php?id=<?=$data_user['id']?>"
onclick="return confirm('Apakah anda yakin menghapus data ini?')"
class="btn btn-danger">Hapus</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<a class="btn btn-primary" href="tambah_user.php" role="button">Tambah</a>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds 3Ulb9Bn9Plx0x4"
crossorigin="anonymous"></script>
</body>
</html>
<?php
include "footer.php";
?>