forked from chinmayd3110/Student-Portal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
teacher_homepage.php
97 lines (71 loc) · 1.92 KB
/
teacher_homepage.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
<?php
require('connect.php');
session_start();
//Teacher file. Displays teacher data. Directs to particular class.
$t_id = $_SESSION['teacher_id'];
$query="SELECT * FROM teacher_info where teacher_id='$t_id'";
$result=mysqli_query($connection,$query);
$row = $result->fetch_assoc();
$name=$row['name'];
$department=$row['department'];
echo $name;
echo "<br>";
echo $department;
$query="SELECT * FROM courses where teacher_id='$t_id'";
$result=mysqli_query($connection,$query);
echo "<br>The courses that you handle are: <br>";
?>
<!DOCTYPE html>
<html>
<head>
<title>Teacher home_page</title>
<style>
.inputs{
font-size: 20px;
padding-bottom: 8px;
margin-bottom: 70px;
border: 0;
border-bottom: 1px solid #ccc;
width: 20%;
padding-top: 10px;
margin-top: 30px;
}
#btn{
background-color: #0056ff;
padding-top: 12px;
padding-bottom: 12px;
font-size: 18px;
border: none;
color: aliceblue;
padding-left: 24px;
padding-right: 24px;
}
</style>
</head>
<body>
<form action="specific_class.php" method="post">
<div>
<select class="inputs" name="teach">
<?php
while($row = $result->fetch_assoc())
{
$course=$row['course_code'];
$dept=$row['department'];
$sem=$row['semester'];
$sec=$row['section'];
$total=$course."-".$dept."_".$sem."_".$sec;
?>
<option value="<?php echo $total?>" > <?php echo $total; ?> </option>
<?php
}
?>
<select/>
</div>
<div>
<input id="btn" type="submit" name="submit" value="submit">
</div>
</form>
</body>
</html>
<?php
?>