-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_maths.php
60 lines (59 loc) · 1.22 KB
/
view_maths.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
<!DOCTYPE html>
<html>
<head>
<style>
#table{
margin-top:30px;
font-size:20px;
text-transform: uppercase;
}
</style>
</head>
<?php
@require "navbar1.php";
require 'connect.php';
?>
<body>
<div id='table'><br>
<table style="width:99.9%"border="5">
<?php
include 'connect.php';
$sql = "SELECT * FROM `subwise` WHERE `subject`='MATHS'";
$result = $conn->query($sql);
echo '<tr>';
echo '<th>SEMESTER</th>';
echo '<th>GROUP</th>';
echo '<th>ROLL NO</th>';
echo '<th>NAME</th>';
echo '<th>SUBJECT</th>';
echo '<th>NO.OF.DAYS Present</th>';
echo '<th>NO.OF.DAYS Absent</th>';
echo '<th>PERCENT OF ATTENDANCE</th>';
echo '</tr>';
// output data of each row
while($row = $result->fetch_assoc()) {
$semester = 1;
$group = 'CSE';
$roll = $row['rollno'];
$name = $row['name'];
$subject = $row['subject'];
$present = $row['present'];
$absent = $row['absent'];
$percent = $row['percent'];
echo '<tr>';
echo "<td>$semester</td>";
echo "<td>$group</td>";
echo "<td>$roll</td>";
echo "<td>$name</td>";
echo "<td>$subject</td>";
echo "<td>$present</td>";
echo "<td>$absent</td>";
echo "<td>$percent</td>";
echo '</tr>';
}
$conn->close();
?>
</table>
</div>
</body>
</html>