-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkriteria.php
More file actions
76 lines (57 loc) · 1.26 KB
/
Copy pathkriteria.php
File metadata and controls
76 lines (57 loc) · 1.26 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
include('config.php');
include('fungsi.php');
// menjalankan perintah edit
if(isset($_POST['edit'])) {
$id = $_POST['id'];
header('Location: edit.php?jenis=kriteria&id='.$id);
exit();
}
// menjalankan perintah delete
if(isset($_POST['delete'])) {
$id = $_POST['id'];
deleteKriteria($id);
}
// menjalankan perintah tambah
if(isset($_POST['tambah'])) {
$nama = $_POST['nama'];
tambahData('kriteria',$nama);
}
include('header.php');
?>
<section class="content">
<h2 class="ui header">Kriteria</h2>
<table class="ui celled table">
<thead>
<tr>
<th class="collapsing">No</th>
<th>Nama Kriteria</th>
<th>Atribut</th>
</tr>
</thead>
<tbody>
<?php
// Menampilkan list kriteria
$query = "SELECT * FROM kriteria ORDER BY id";
$result = mysqli_query($koneksi, $query);
$i = 0;
while ($row = mysqli_fetch_array($result)) {
$i++;
?>
<tr>
<td><?php echo $i ?></td>
<td><?php echo $row['nama'] ?></td>
<td><?= $row['atribut'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<br>
<form action="alternatif.php">
<button class="ui right labeled icon button" style="float: right;">
<i class="right arrow icon"></i>
Lanjut
</button>
</form>
</section>
<?php include('footer.php'); ?>