From 86d87b985ce10c51cf044c68bcb3382a20a1f6bc Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 30 Apr 2021 10:03:14 +0300 Subject: Reports can be bound to bugs --- report/edit.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'report/edit.php') diff --git a/report/edit.php b/report/edit.php index ef289bd..cd2e1a8 100644 --- a/report/edit.php +++ b/report/edit.php @@ -14,8 +14,9 @@ $title = ""; $submitter = $_SESSION['user_name']; $description = ""; +$conn = new PDO($config['db']['dsn'], $config['db']['username'], $config['db']['password']); + if($id != "") { - $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"); @@ -28,6 +29,9 @@ if($id != "") { $description = $result['description']; } +# get bug id's +$bugs = $conn->query("SELECT id, title FROM bugs"); + ?>
@@ -35,6 +39,14 @@ if($id != "") {

Title:

Submitted by:

Description:

+

Assign to bug:

-- cgit v1.2.1