-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecords.php
56 lines (48 loc) · 1.64 KB
/
records.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
<h1 class="page-header">Student Records</h1>
<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><center><a class="btn btn-info" href="rms.php?page=record&id=<?php echo $row['STUDENT_ID'] ?>&prog=<?php echo $row2['PROGRAM']?>">View Records</a></center></td>
</tr>
<?php
}
} mysqli_close($conn);
?>
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
$("#students").dataTable(
{ "aaSorting": [[ 0, "asc" ]] }
);
});
</script>