Beginning of the admin interface

This commit is contained in:
2017-10-07 23:12:10 +02:00
parent 7cd78ac3bb
commit 89c2a59fd6
7 changed files with 212 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
<?php
require __DIR__ . '/../../../src/_autoload.php';
require __DIR__ . '/../../../sql_config.php';
$pdo = new \PDO($dbDsn, $dbUser, $dbPass);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$eventID = $_GET['id'];
$query = 'DELETE FROM events WHERE id=\'' . $eventID . '\'';
$statement = $pdo->prepare($query);
$statement->execute();
header('Location: ' . $_SERVER['HTTP_REFERER']);
?>