-
Notifications
You must be signed in to change notification settings - Fork 0
/
number.php
66 lines (65 loc) · 1.96 KB
/
number.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
59
60
61
62
63
64
65
66
<html>
<head>
<!-- Dwiki Sulthon Saputra Marbi - 26 Maret 2019 -->
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<style>
body {background-color: lightblue;}
h1 {color: white;}
h1.sansserif {
font-family: Verdana, Geneva, sans-serif;
}
</style>
<body>
<h1 class="sansserif" style="text-align:center;"> Selamat Datang Di Pencarian dan Pengeditan KHS! </h1>
<form action = "cari_ver_admin.php" method="GET">
<input type="text" name="cari"/><br>
<input type="submit" value="Cari" class="tombol"/><br>
</form>
<table class="table1">
<tr>
<th>No</th>
<th>Nama</th>
<th>NIM</th>
<th>Mata Kuliah</th>
<th>Nilai Angka</th>
<th>Nilai Huruf</th>
<th>SKS</th>
<th>Nilai Kumulatif</th>
<th></th>
<th></th>
</tr>
<?php
include "config.php";
$sql = $pdo->prepare("SELECT * FROM `khs`");
$sql->execute();
$no = 1; // Untuk penomoran tabel, di awal set dengan 1
while($data = $sql->fetch()){ // Ambil semua data dsari hasil eksekusi $sql
echo "<tr>";
echo "<td>".$no."</td>";
echo "<td>".$data['nama']."</td>";
echo "<td>".$data['nim']."</td>";
echo "<td>".$data['nama_matkul']."</td>";
echo "<td>".$data['nilai_angka']."</td>";
echo "<td>".$data['nilai_huruf']."</td>";
echo "<td>".$data['sks']."</td>";
echo "<td>".$data['nilai_kumulatif']."</td>";
?>
<td>
<a class="edit" href="edit.php?id=<?php echo $data['id']; ?>">Edit</a>
</td>
<td>
<a class="hapus" href="hapus.php?id=<?php echo $data['id']; ?>">Hapus</a>
</td>
<?php
echo "</tr>";
$no++; //Tambah 1 setiap kali looping
}
?>
</table>
<br>
<a href="menu.php"class="tombol"> Menu Utama</a><br><br>
<pre>
<a href="logout.php"class="tombol"> Logout</a><br><br>
</body>
</html>