21 lines
610 B
PHP
21 lines
610 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 Punkte WHERE m_id = ? AND s_id = ?");
|
|
$stmt->bindParam(1, $_POST["m_id"], PDO::PARAM_INT);
|
|
$stmt->bindParam(2, $_POST["s_id"], PDO::PARAM_INT);
|
|
$stmt->execute();
|
|
} catch(PDOException $e) {
|
|
handle_pdo_exception($e);
|
|
}
|
|
}
|
|
|
|
$con = null;
|
|
header("Location: statistik.php");
|
|
die;
|
|
?>
|