-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatatbl.php
More file actions
71 lines (69 loc) · 3.4 KB
/
datatbl.php
File metadata and controls
71 lines (69 loc) · 3.4 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
<?php
$connect = mysqli_connect("localhost", "root", "", "record_mgt");
if(mysqli_connect_error()){
echo "Failed to connect";
exit();
}
echo "connection Success";
$query ="SELECT * FROM appointm";
$result = mysqli_query($connect, $query);
echo $result
?>
<!DOCTYPE html>
<html>
<head>
<title>Webslesson Tutorial | Datatables Jquery Plugin with Php MySql and Bootstrap</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/js/bootstrap.min.js" integrity="sha512-EKWWs1ZcA2ZY9lbLISPz8aGR2+L7JVYqBAYTq5AXgBkSjRSuQEGqWx8R1zAX16KdXPaCjOCaKE8MCpU0wcHlHA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> -->
<!-- <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> -->
</head>
<body>
<br /><br />
<div class="container">
<h3 align="center">Datatables Jquery Plugin with Php MySql and Bootstrap</h3>
<br />
<div class="table-responsive">
<table id="employee_data" class="table table-striped table-bordered">
<thead>
<tr>
<td>apno</td>
<td>vno</td>
<td>offic</td>
<td>items</td>
<td>vdate</td>
<td>intime</td>
<td>outtime</td>
<td>usr</td>
</tr>
</thead>
<?php
while($row = mysqli_fetch_array($result))
{
// echo '
// <tr>
// <td>'.$row["apno"].'</td>
// <td>'.$row["vno"].'</td>
// <td>'.$row["offic"].'</td>
// <td>'.$row["items"].'</td>
// <td>'.$row["vdate"].'</td>
// <td>'.$row["intime"].'</td>
// <td>'.$row["outtime"].'</td>
// <td>'.$row["usr"].'</td>
// </tr>
// ';
}
?>
</table>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
$('#employee_data').DataTable();
});
</script>