No report selected, redirecting to index..."; header("Refresh: 2; URL=$_SERVER[HTTP_REFERER]"); goto footer; } $conn = new PDO($config['db']['dsn'], $config['db']['username'], $config['db']['password']); $query = $conn->prepare("SELECT title, description, users.username AS submitter FROM reports JOIN users ON reports.author = users.id WHERE reports.id=:report_id"); $query->bindParam(':report_id', $_GET['id']); $query->execute(); $result = $query->fetch(); $markdown = new Parsedown(); echo "
$result[title]
"; echo "Submitted by $result[submitter]
"; echo '' . $markdown->text($result['description']) . '
'; if(session_set()) { echo ""; } footer: require_once(TEMPLATES_PATH . "/footer.php"); ?>