Activate Error Handler

This commit is contained in:
2025-05-29 23:14:57 +02:00
parent 1e33bdcf9b
commit 40ab6c4f03
+8 -23
View File
@@ -5,6 +5,14 @@ if (!isset($_SESSION["login"]) && $_SESSION["login"] != "true-as-hell") {
die();
}
function myErrorHandler($errno, $errstr, $errfile, $errline) {
echo "<p>Custom error:</p> [$errno] $errstr<br>";
echo "Error on line $errline in $errfile<br>";
}
// Set user-defined error handler function
set_error_handler("myErrorHandler");
$furatalog = new mysqli("localhost", "furatalog_admin_usr", "NR6tLk7c56bPT5[]", "furatalog");
$creator_name = $_POST["creator_name"];
@@ -113,27 +121,4 @@ if ($contentResult->num_rows == 0) {
}
?>