gymrooster_php/php/delete.php

11 lines
261 B
PHP

<?php
if (isset($_GET['date']) && isset($_GET['docent'])) {
require 'conn.php';
$conn->query("DELETE FROM rooster WHERE docent = " . $_GET['docent'] . " AND dag = DATE('" . $_GET['date'] . "');");
}
header('Location: /dashboard?date=' . $_GET['date']);