-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
47 lines (42 loc) · 1.01 KB
/
index.php
File metadata and controls
47 lines (42 loc) · 1.01 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
<?php
require 'koneksi.php';
$result = mysqli_query($conn, "SELECT * FROM siswa ORDER BY id DESC");
?>
<!DOCTYPE html>
<html>
<head>
<title>BELAJAR CRUD</title>
</head>
<body>
<table border="4">
<tr>
<td>id</td>
<td>nisn</td>
<td>nama</td>
<td>alamat</td>
<td>jenis kelamin</td>
<td>foto</td>
<td>aksi</td>
</tr>
<?php
while ($data = mysqli_fetch_assoc($result)) {
?>
<tr>
<td> <?php echo $data["id"] ?></td>
<td> <?php echo $data["nisn"] ?></td>
<td> <?php echo $data["nama"] ?> </td>
<td> <?php echo $data["alamat"] ?></td>
<td> <?php echo $data["jenis_kelamin"] ?></td>
<td> <img src="media/foto_profile/<?php echo $data['foto'] ?>" width="128"></td>
<td>
<a href="edit.php?edit=<?php echo $data["id"] ?>">edit<i>✏</i></a>
<br>
<a href="proses.php?delete=<?php echo $data["id"] ?>">delete<i>🗑</i></a>
</td>
</tr>
<?php
}
?>
</table>
</body>
</html>