PHP Classes

File: deleteEvent.php

Recommend this page to a friend!
  Classes of ganesh kavhar   PHP Event Planner   deleteEvent.php   Download  
File: deleteEvent.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Event Planner
Application to help users to organize events
Author: By
Last change:
Date: 2 years ago
Size: 370 bytes
 

Contents

Class file image Download
<?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');