-
Notifications
You must be signed in to change notification settings - Fork 0
/
apti.php
82 lines (76 loc) · 2.06 KB
/
apti.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
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<title>Datatable Example PHP MySQLi</title>
<link href="bootstrap.min.css" rel="stylesheet">
<link href="dataTables.bootstrap.css" rel="stylesheet">
<link href="dataTables.responsive.css" rel="stylesheet">
<style>
.mytablee {
margin-left: 50px;
margin-top: 30px;
width: 1000px;
}
</style>
</head>
<body>
<br>
<div class="mytable">
<table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
<thead>
<tr>
<th>S.No</th>
<th>Section Name</th>
<th>Class Room</th>
<th>Trainer Name</th>
<th>Topic Name</th>
<th>Date</th>
<th>Start Time</th>
<th>End Time</th>
<th>Hours Completed</th>
<th>Hours Pending</th>
<th>Total Hours</th>
</tr>
</thead>
<tbody>
<?php
include('conn.php');
$query = mysqli_query($conn, "SELECT sa.*, s.Section_Name, s.classroom
FROM sessionhoursaptitude sa
INNER JOIN sections s ON sa.Section_id = s.section_id");
$counter = 1;
while ($row = mysqli_fetch_array($query)) {
?>
<tr>
<td><?php echo $counter++; ?></td>
<td><?php echo $row['Section_Name']; ?></td>
<td><?php echo $row['classroom']; ?></td>
<td><?php echo $row['TrainerName']; ?></td>
<td><?php echo $row['TopicName']; ?></td>
<td><?php echo $row['Date']; ?></td>
<td><?php echo $row['StartTime']; ?></td>
<td><?php echo $row['EndTime']; ?></td>
<td><?php echo $row['hour_id']; ?></td>
<td><?php echo $row['hours_pending']; ?></td>
<td><?php echo $row['hours_tot']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<script src="jquery.min.js"></script>
<script src="jquery.dataTables.min.js"></script>
<script src="dataTables.bootstrap.min.js"></script>
<script src="dataTables.responsive.js"></script>
<script src="bootstrap.min.js"></script>
<script>
$(document).ready(function () {
$('#dataTables-example').DataTable({
responsive: true
});
});
</script>
</body>
</html>