From 5ce55c3f1e0bfad66da9c6a428deb2f65e888c34 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Tue, 8 Oct 2024 09:34:09 +0800 Subject: [PATCH] Fix bug 204 --- Course.php | 5 +++-- Header.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Course.php b/Course.php index c84ccff..c5a6cfb 100644 --- a/Course.php +++ b/Course.php @@ -650,8 +650,9 @@ include 'Header.php'; function remarking(data) { const details = prompt("Please enter your remarking reasons",""); - - window.location.href = data+"&details="+details; + if (details != null) { + window.location.href = data+"&details="+details; + } } diff --git a/Header.php b/Header.php index c197fd2..0733467 100644 --- a/Header.php +++ b/Header.php @@ -9,8 +9,10 @@ try { } catch (mysqli_sql_exception $e) { echo $e->getMessage(); } + // Check database connection if (mysqli_connect_errno()) { + echo " Error number: ".mysqli_connect_errno(); exit(); } ?>