-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
70 lines (55 loc) · 1.81 KB
/
report.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
<h1 class="page-header">Search Student Records</h1>
<div class="container">
<div class="col-sm-3">
<div class="input-group">
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Students List</h3>
</div>
<div class="panel-body">
<table id="students" class="table table-bordered">
<thead>
<tr id="heads">
<th style="width:10%">REG NO.</th>
<th style="width:20%">Name</th>
<th style="width:10%">Gender</th>
<th style="width:10%">Curriculum</th>
<th style="width:10%"></th>
</tr>
</thead>
<tbody>
<?php
include 'db.php';
$sql= mysqli_query($conn, "SELECT * FROM student_info ");
while($row = mysqli_fetch_assoc($sql)) {
$sql2= mysqli_query($conn, "SELECT * FROM program WHERE PROGRAM_ID = '".$row['PROGRAM']."' ");
while($row2 = mysqli_fetch_assoc($sql2)) {
?>
<tr>
<td><?php echo $row['LRN_NO'] ?></td>
<td><?php echo $row['LASTNAME'] . ' ' . $row['FIRSTNAME']. ' ' . $row['MIDDLENAME'] ?></td>
<td><?php echo $row['GENDER'] ?></td>
<td><?php echo $row2['PROGRAM'] ?></td>
<td><a class="btn btn-info" onclick='window.open("form137.php?id=<?php echo $row['STUDENT_ID'] ?>")'><i class="fa fa-fw fa-print"></i>Printable Report</a></td>
</tr>
<?php
}
} mysqli_close($conn);
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
$("#students").dataTable(
{ "aaSorting": [[ 0, "asc" ]] }
);
});
</script>