-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent.php
More file actions
92 lines (66 loc) · 2.11 KB
/
student.php
File metadata and controls
92 lines (66 loc) · 2.11 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
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
<?php
require_once "config.php";
require_once "database.php";
$db = connect(DB_SERVER,USER,PASSWORD,DB_NAME);
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Student Dashboard</title>
<link
rel="stylesheet"
href="./bootstrap-5.1.3-dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="./style.css" />
<link rel="stylesheet" href="./fontawesome-free-6.0.0-web/css/all.css" />
</head>
<body>
<form <?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?> method="post">
<section id="menu">
<div class="logo">
<h2>Student Dashboard</h2>
</div>
<div class="items">
<li>
<i class="fa-solid fa-chart-pie"></i
><a href="index.html">Dashboard</a>
</li>
<button class="button">
<li>
<i class="fa fa-download" ></i>See Transcript
</li>
</button>
<li>
<i class="fa-solid fa-right-from-bracket"></i
><a href="login.html">Log out</a>
</li>
</div>
</section>
<div class="container">
<h1>Exam Card</h1>
<hr>
<?php
if(isset($_POST['login'])){
$_SESSION['admNo'] = $_POST['adm_num'];
$student_id = select_studentId($db,$_SESSION['admNo']);
foreach($student_id as $id){
$sql = "SELECT `code`,`name` FROM student_course JOIN units on `code` = `unit_code` WHERE student_id =".$id['ID'];
}
$resultset = $db->query($sql);
while ($row = $resultset->fetch_assoc()) {
echo $row['code']." ".$row['name']."<input type = 'submit' value = 'Delete'".'<br>' .'<br>';
}
}elseif($_SESSION['admNo']!=null){
echo "deleted";
}
?>
</div>
</form>
<script src="./bootstrap-5.1.3-dist/js/bootstrap.min.js">
</script>
</body>
</html>