-
Notifications
You must be signed in to change notification settings - Fork 2
/
specific_class.php
102 lines (70 loc) · 1.67 KB
/
specific_class.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
<?php
require('connect.php');
session_start();
if(isset($_POST['submit']))
{
$zxc = $_POST['teach'];
echo "$zxc<br>";
$sep = explode('-',$zxc);
$course_code = $sep[0];
echo "$course_code<br>";
$_SESSION['course_code'] = $sep[0];
$_SESSION['table_name']= $sep[1]."_attendance";
echo $_SESSION['teacher_id'];
}
?>
<!DOCTYPE html>
<html>
<head>
<style>
#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>
<br>
<form action="specific_class.php" method="post">
<div>
<input id="btn" type="submit" name="take_attendance" value="take_attendance">
</div>
<br>
<div>
<input id="btn" type="submit" name="view_attendance" value="view_attendance">
</div>
<br>
<div>
<input id="btn" type="submit" name="enter_marks" value="enter_marks">
</div>
<br>
<div>
<input id="btn" type="submit" name="view_marks" value="view_marks">
</div>
</form>
<?php
if(isset($_POST['take_attendance']))
{
header("Location: take_attendance.php");
}
if(isset($_POST['view_attendance']))
{
header("Location: view_attendance.php");
}
if(isset($_POST['enter_marks']))
{
header("Location: enter_marks.php");
}
if(isset($_POST['view_marks']))
{
header("Location: view_marks.php");
}
?>
</body>
</html>