nettsiden/www/admin/prosjekter/delete.php

15 lines
478 B
PHP
Raw Normal View History

2017-10-28 16:44:56 +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);
$projectID = $_GET['id'];
$query = 'DELETE FROM projects WHERE id=\'' . $projectID . '\'';
$statement = $pdo->prepare($query);
$statement->execute();
header('Location: ' . $_SERVER['HTTP_REFERER']);
?>
<a href=".?page=1">Om du ikke ble omdirigert tilbake klikk her</a>