load_user()"; ?> format('Y-m-d'); $sql = "DELETE FROM reservations WHERE day <= ?"; $stmt = $link->prepare($sql); if ($stmt) { $stmt->bind_param("s", $formattedYesterday); $stmt->execute(); $stmt->close(); } 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 (?, ?, ?, ?);"; $stmt = $link->prepare($sql); $stmt->bind_param("sssi",$time_from, $time_to, $day,$userid); $stmt->execute(); } if(isset($_GET["del"])){ $id=htmlspecialchars($_GET["del"]); $sql="delete from reservations where id=$id"; $stmt = $link->prepare($sql); $stmt->execute(); } ?> ");?>
| Zeit von | Zeit bis | Datum | Reservation löschen |
|---|---|---|---|
| ".$row["time_from"]." | ".$row["time_to"]." | ".$row["day"]." | Löschen |