-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkgrade.php
123 lines (93 loc) · 4.32 KB
/
checkgrade.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
session_start();
//checkgrade
$result;
if(isset($_POST['sidch'])){
$connection = mysqli_connect('localhost','root','','bulearn');
mysqli_set_charset($connection,'utf8');
$sid=$_POST['sidch'];
$cocode=$_POST['ccodech'];
$query = "SELECT * FROM student_course where sid ='$sid' and ccode='$cocode'";
$result = mysqli_query ($connection , $query);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Check Grade and Attendance</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bu.css">
<!-- <link href="https://fonts.googleapis.com/css?family=Anton|Gugi|Josefin+Sans|Lora|Merriweather+Sans|Poppins" rel="stylesheet">-->
</head>
<style>
.grtable{
color: aliceblue;
margin-top: 130px;
margin-left: 30%;
}
.grtable table{
border: 1px solid black;
}
.grtable table th{
color: orange;
}
.grtable table td,.grtable table th{
border: 1px solid white;
padding: 10px;
}
</style>
<body style="background: url(img/blackboard-chalk-chalkboard-40382.jpg) no-repeat center center;">
<!--Start Navbar-->
<?php include 'header.php'; ?>
<!--End Navbar-->
<section class=" log sign">
<div class="container-fluid">
<h4>Check Your Activity in any Course with<span>BU_Learn</span></h4>
<span>All fields are required</span>
<!-- <h6>--><?php //if(isset($_POST['message'])){echo $_GET['message'];} ?><!--</h6>-->
<form method="POST" action="checkgrade.php">
<div class="form-group">
<label for="formGroupExampleInput">Student ID</label>
<input type="number" class="form-control" id="formGroupExampleInput" required name="sidch">
</div>
<div class="form-group">
<label for="formGroupExampleInput">Course Code</label>
<input type="text" class="form-control" id="formGroupExampleInput" required name="ccodech">
</div>
<div class="form-group">
<button type="submit">Check</button>
</div>
</form>
</div>
</section>
<section class="grtable">
<table>
<tr>
<th>Student ID</th>
<th>Course Code</th>
<th>Grade</th>
<th>Attendance</th>
</tr>
<?php
if(isset($_POST['sidch'])){
while ($row = mysqli_fetch_array($result))
{
echo '<tr>
<td id="sid">'.$row['sid'].'</td>
<td id="ccode">'.$row['ccode'].'</td>
<td id="grade">'.$row['grade'].' %</td>
<td id="attend">'.$row['absence'].'</td>
</tr> ';
}
}
?>
</table>
</section>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bu.js"></script>
</body>
</html>