-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
70 lines (61 loc) · 1.93 KB
/
index.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
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<head>
<title>MapBox CRUD</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css" />
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>
<style type="text/css">
.content{
max-width: 800px;
margin: auto;
}
h1{
text-align: center;
padding-bottom: 60px;
}
</style>
</head>
<body>
<div class="content">
<h1>MAPBOX CRUD</h1>
<table id="tabel-data" class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Nama Tempats</th>
<th>Keterangan</th>
<th>Lat,Long</th>
<th >Opsi</th>
</tr>
</thead>
<tbody>
<?php
include 'koneksi.php';
$wisata = mysqli_query($link,"select * from t_wisata");
while($row = mysqli_fetch_array($wisata))
{?>
<tr>
<td><?php echo $row['id'];?></td>
<td><?php echo $row['nama'];?></td>
<td><?php echo $row['keterangan'];?></td>
<td><?php echo $row['lat_long'];?></td>
<td>
<a class="edit" href="editPage.php?id=<?php echo $row['id']; ?>">Edit</a> |
<a class="hapus" href="delete.php?id=<?php echo $row['id']; ?>">Hapus</a>
</td>
</tr>
<?php } ?>
<p><a href="addNew.php"><button type="button" id="add_button" class="btn btn-success">Add Data</button></p>
</tbody>
<script>
$(document).ready(function(){
$('#tabel-data').DataTable();
});
</script>
</table>
</body>
</html>