-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
58 lines (58 loc) · 1.96 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
<!-- //link ke skrip db_koneksi -->
<?php include 'db_koneksi.php';?>
<!-- // -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PHP + MySQL + DataTables</title>
<!-- //CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/dataTables.bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/gaya.css">
<!-- //JS -->
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/dataTables.tableTools.js"></script>
<script type="text/javascript" src="js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="js/datatables.js"></script>
</head>
<body>
<div class="container" style="margin-top:50px;">
<div class="row">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">PHP + MySQL + DataTables</h3>
</div>
<div class="panel-body">
<!-- //di tag table, kan ada id=contoh_gan, itu id di panggil dari direktori js/datatables.js -->
<table id="contoh_gan" class="table table-bordered table-hover">
<thead align="center">
<tr>
<th>lorem ipsum satu</th>
<th>lorem ipsum dua</th>
<th>lorem ipsum tiga</th>
<th>lorem ipsum empat</th>
<th>lorem ipsum lima</th>
</tr>
</thead>
<tbody>
<?php while($row =mysql_fetch_array($db)){ ?>
<tr>
<td><?=$row['lorem_ipsum_satu'] ?></td>
<td><?=$row['lorem_ipsum_dua'] ?></td>
<td><?=$row['lorem_ipsum_tiga'] ?></td>
<td><?=$row['lorem_ipsum_empat'] ?></td>
<td><?=$row['lorem_ipsum_lima'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>