Files
PunkteSystem-KSP/app/public/delete_team.php
2022-06-17 20:05:59 +02:00

20 lines
502 B
PHP

<?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);
}
}
$con = null;
header("Location: mannschaft.php");
die;
?>