-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlihat.php
47 lines (38 loc) · 1.36 KB
/
lihat.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
<?php
$conn = mysqli_connect("localhost", "root", "");
if( $conn ){
$db = mysqli_select_db($conn, "junior_web_developer");
$query = "SELECT * FROM lumi_novry_m";
$result = mysqli_query($conn, $query) or die("ERROR");
echo "<center><h1 style='font-family: Verdana, Geneva, Tahoma, sans-serif; color: green;'>Data Peserta Pelatihan Pemrograman Web</h1>";
echo "<table border='5' cellpadding='5' cellspacing='0'>";
echo "<tr>";
echo "<th>Nama</th>";
echo "<th>NPM</th>";
echo "<th>Password</th>";
echo "<th>Jenis Kelamin</th>";
echo "<th>Agama</th>";
echo "<th>Kritik</th>";
echo "<th>Saran</th>";
echo "<th>Edit</th>";
echo "<th>Hapus</th>";
echo "</tr>";
// Iterasi
while( $data = mysqli_fetch_row($result) ){
echo "<tr>";
echo "<td>$data[0]</td>";
echo "<td>$data[1]</td>";
echo "<td>$data[2]</td>";
echo "<td>$data[3]</td>";
echo "<td>$data[4]</td>";
echo "<td>$data[5]</td>";
echo "<td>$data[6]</td>";
echo "<td><a href='edit.php?nama=$data[0]&npm=$data[1]&pass=$data[2]&saran=$data[6]'>Edit</></td>";
echo "<td><a href='hapus.php?npm=$data[1]'>Hapus</></td>";
echo "</tr>";
}
echo "</table></center>";
}else{
echo "ERROR";
}
echo "<center><a href='index.php'>Halaman Utama</></center>";