2017-10-07 23:12:10 +02:00
|
|
|
<?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();
|
|
|
|
|
2017-10-12 00:38:28 +02:00
|
|
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
2017-10-08 03:33:42 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<a href=".?page=1">Om du ikke ble automatisk omdirigert tilbake klikk her</a>
|