-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord.php
More file actions
53 lines (42 loc) · 1.15 KB
/
record.php
File metadata and controls
53 lines (42 loc) · 1.15 KB
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
<!doctype html>
<html>
<head>
<title>Pamplin Advising Tool</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<nav>
<img src="vt.svg" height="15%" width="15%">
<a href="landing.php">Home</a> |
<a href="timetable.php">Timetable of Classes</a> |
<a href="record.php">Your Record</a> |
<a href="advising.php">Advising</a>
</nav>
</br>
</br>
</body>
</html>
<?php
session_start();
require_once("db.php");
echo "Record of classes for student ".$_SESSION["student_ID"].".</br></br>";
$student_ID = $_SESSION["student_ID"];
$sql = "select * from enrollments where student_ID = $student_ID";
$result = $mydb->query($sql);
echo
"<table align='center' style= 'background-color:papayawhip;'>
<tr style= 'background-color:darkorange; color:white;'>
<th> Enrollment ID </th>
<th> CRN </th>
<th> student_ID </th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo
"<tr>
<td>".$row['enrollment_ID']."</td>
<td>".$row['CRN']."</td>
<td>".$row['student_ID']."</td>
</tr>";
}
echo "</table>"
?>