-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructor.php
More file actions
executable file
·76 lines (65 loc) · 2.26 KB
/
Copy pathinstructor.php
File metadata and controls
executable file
·76 lines (65 loc) · 2.26 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
<?php
include('session.php');
if($_SERVER["REQUEST_METHOD"] == "POST") {
// username and password sent from form
$rutorid = mysqli_real_escape_string($db,$_POST['utorid']);
$assignment = mysqli_real_escape_string($db,$_POST['markChange']);
$newmark = mysqli_real_escape_string($db,$_POST['newmark']);
$sql = "UPDATE marks SET marks.$assignment = '$newmark' WHERE utorid = '$rutorid'";
$result = mysqli_query($db,$sql);
}
?>
<html>
<head>
<title>Welcome inst </title>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<h1>Welcome <?php echo $login_name; ?></h1>
<h2><a href = "logout.php">Sign Out</a></h2>
<?php
echo 'hi';
$seegrade= "<form method=\"post\" action=\"fetch.php\">
Get list of students<br>
<input type=\"submit\" name=\"sButton\"><br>
</form>";
echo $seegrade;
$seefeedback= "<form method=\"post\" action=\"instanon.php\">
Get anonymous feedbacks<br>
<input type=\"submit\" name=\"sButton\"><br>
</form>";
echo $seefeedback;
$seeallmarks= "<form method=\"post\" action=\"allmarks.php\">
See class marks<br>
<input type=\"submit\" name=\"sButton\"><br>
</form>";
echo $seeallmarks;
$seeremarks= "<form method=\"post\" action=\"seeremarks.php\">
See remark requests<br>
<input type=\"submit\" name=\"sButton\"><br>
</form>";
echo $seeremarks;
?>
<div id = "Remark">
<form action"" method = "post">
<input type="text" name="utorid" placeholder="Student's Utorid"/>
<select id="markChange " name="markChange">
<option value="Q1">Q1</option>
<option value="Q2">Q2</option>
<option value="Q3">Q3</option>
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="A3">A3</option>
<option value="Midterm">Midterm</option>
<option value="Final">Final</option>
</select>
<input type="int" name="newmark" placeholder="New Mark"/>
<input type="submit" name="submit" value= "SUBMIT">
</form>
</div>
</body>
</html>