No bug selected, redirecting to index..."; header('Refresh: 2; URL=index.php'); } else { if(isset($_SESSION['user_id']) && $_SESSION['user_id'] != "") { echo "

Edit

"; } $conn = new PDO($config['db']['dsn'], $config['db']['username'], $config['db']['password']); $markdown = new Parsedown(); $query = "SELECT title, description, users.username AS submitter FROM bugs JOIN users ON bugs.author = users.id WHERE bugs.id=$_GET[id]"; $result = $conn->query($query)->fetch(); echo "

$result[title]

"; echo "

Submitted by $result[submitter]

"; echo '

' . $markdown->text($result['description']) . '

'; } require_once(TEMPLATES_PATH . "/footer.php"); ?>