20 lines
502 B
PHP
20 lines
502 B
PHP
<?php
|
|
session_start();
|
|
include("../scripts/connection.php");
|
|
include("../scripts/functions.php");
|
|
$user_data = check_admin($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);
|
|
}
|
|
}
|
|
|
|
$con = null;
|
|
|
|
header("Location: mannschaft.php");
|
|
die;
|
|
?>
|