<?php
require_once 'classes/Event.php';
require_once 'classes/EventTableGateway.php';
require_once 'classes/Connection.php';
if (!isset($_GET['id'])) {
die("Illegal request");
}
$id = $_GET['id'];
$connection = Connection::getInstance();
$gateway = new EventTableGateway($connection);
$gateway->delete($id);
header('Location: viewEvents.php');
|