delete teams
This commit is contained in:
18
app/public/delete_team.php
Normal file
18
app/public/delete_team.php
Normal 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;
|
||||
?>
|
||||
Reference in New Issue
Block a user