diff --git a/sys0-code/app/reservations.php b/sys0-code/app/reservations.php
index 92e475d..2110757 100644
--- a/sys0-code/app/reservations.php
+++ b/sys0-code/app/reservations.php
@@ -53,9 +53,10 @@ if(isset($_POST["res"])){
$time_from=htmlspecialchars($_POST["time_from"]);
$time_to=htmlspecialchars($_POST["time_to"]);
$day=htmlspecialchars($_POST["date"]);
- $sql="INSERT INTO reservations (time_from,time_to,day,set_by_userid) VALUES (?, ?, ?, ?);";
+ $class=htmlspecialchars($_POST["class"]);
+ $sql="INSERT INTO reservations (time_from,time_to,day,set_by_userid,for_class) VALUES (?, ?, ?, ?, ?);";
$stmt = $link->prepare($sql);
- $stmt->bind_param("sssi",$time_from, $time_to, $day,$userid);
+ $stmt->bind_param("sssii",$time_from, $time_to, $day,$userid,$class);
$stmt->execute();
}
if(isset($_GET["del"])){
@@ -82,20 +83,32 @@ if(isset($_GET["del"])){
+
| Zeit von | Zeit bis | Datum | Reservation löschen | |
|---|---|---|---|---|
| Zeit von | Zeit bis | Datum | Klasse | Reservation löschen |
| ".$row["time_from"]." | ".$row["time_to"]." | ".$row["day"]." | Löschen | |
| ".$row["time_from"]." | ".$row["time_to"]." | ".$row["day"]." | ".$row["name"]." | Löschen |