-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-edit.php
More file actions
58 lines (54 loc) · 1.76 KB
/
admin-edit.php
File metadata and controls
58 lines (54 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
session_start();
if (!isset($_SESSION['username'])) {
header("Location: login.php");
echo '
<script>
alert("Password Salah :(");
window.location.href="register.php";
</script>
';
exit;
}
?>
<?php include("body.php"); ?>
<main role="main" class="col-md-1 ml-sm-auto col-lg-12 px-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 border-bottom">
<h2 class='btn btn-sm btn-success '><a href="register.php" class="text-center">Buat Akun</a></h2>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm" style="text-align: center;">
<thead>
<tr>
<th></th>
<th>Username</th>
<th>Password</th>
<th colspan="2">Action</th>
</tr>
</thead>
<tbody>
<?php
include("navbaradmin.php")
?>
<?php
include "koneksi.php";
$qry = "select * from tb_admin";
$data = mysqli_query($kon, $qry);
while ($d = mysqli_fetch_array($data)) {
?>
<form action="admin-edit-proses.php" method="POST">
<tr>
<input type="hidden" name="id" value="<?= $d['iduser'] ?>"></td>
<td><i class="fa fa-user" aria-hidden="true"></i></i></td>
<td><input type="text" class="form-control col-sm-6 container text-center" name="username" value="<?= $d['username'] ?>"></td>
<td><input type="text" class="form-control col-sm-9 container text-center" name="password" value=""></td>
<td><a class='btn btn-sm btn-danger' href='hapus.php?id=<?= $d['iduser'] ?>'>Hapus</a></td>
</tr>
</form>
<?php
}
?>
</tbody>
</table>
</div>
</main>