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', $id); $query->execute(); $result = $query->fetch(); $title = $result['title']; $submitter = $result['submitter']; $description = $result['description']; } # get bug id's $bugs = $conn->query("SELECT id, title FROM bugs"); ?>