-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteacherwebsite.php
More file actions
43 lines (39 loc) · 991 Bytes
/
teacherwebsite.php
File metadata and controls
43 lines (39 loc) · 991 Bytes
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
<?php
session_start();
require("connect.php");
$sql = "SELECT subject_id, name FROM subjects";
$res = $conn->query($sql);
if($res === FALSE){
echo "Błąd";
die();
}
?>
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>
<div class="w3-container w3-blue" >
<h1>Dziennik elektroniczny</h1>
<form align="right" name="form1" method="post" action="logout.php">
<label>
<input name="submit2" type="submit" id="submit2" value="Wyloguj">
</label>
</form>
<form action="teacherwebsite2.php">
<label for="id_subject">Wybierz przedmiot:</label>
<select name="id_subject" id="id_subject">
<?php
while ($row = $res->fetch_assoc()){
$id = $row["subject_id"];
$name = $row["name"];
echo "<option value=\"$id\">$name</option>";
}
?>
</select>
<br><br>
<input type="submit" value="Wybierz">
</form>
</div>
</body>
</html>