Give an error when connection dies

This commit is contained in:
Michał Gdula 2022-09-14 16:43:06 +00:00
parent cb838ad53b
commit dec15d7b63
4 changed files with 50 additions and 27 deletions

26
error.php Normal file
View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<?php require_once __DIR__."/ui/header.php"; ?>
</head>
<body>
<div></div>
<div class="error-root">
<h2>Woops...</h2>
<?php
if ($_GET["e"] == "conn") {
echo "<p>An error occured while connecting to the server. If you're an admin, check the database configuration and/or make sure the database is alive</p>";
} else {
echo "<p>An error occured! But no description was provided.</p>";
}
?>
</div>
<?php require_once __DIR__."/ui/footer.php"; ?>
</body>
</html>