delete teams

This commit is contained in:
2022-06-17 19:57:14 +02:00
parent 0981887613
commit 0f6492ec46
3 changed files with 46 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
<?php
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
$user_data = check_login($con);
if($_SERVER['REQUEST_METHOD'] == "POST") {
try {
$stmt = $con->prepare("DELETE FROM Mannschaft WHERE m_id= :m_id");
$stmt->execute(['m_id' => $_POST['m_id']]);
} catch(PDOException $e) {
handle_pdo_exception($e);
}
}
header("Location: mannschaft.php");
die;
?>