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(); } ?>