No bug selected, redirecting to index...";
header('Refresh: 2; URL=index.php');
} else if(!isset($_SESSION['user_id']) || $_SESSION['user_id'] == "") {
echo "
Not logged in, redirecting to index...
";
header('Refresh: 2; URL=index.php');
} else {
$conn = new PDO($config['db']['dsn'], $config['db']['username'], $config['db']['password']);
$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();
?>