From e7dc728e3420c7f51f793daa70c0e46a43c367f5 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 20 May 2020 13:57:10 +0200 Subject: did it work? --- server/report/index.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 server/report/index.php (limited to 'server') diff --git a/server/report/index.php b/server/report/index.php new file mode 100644 index 0000000..c0ac172 --- /dev/null +++ b/server/report/index.php @@ -0,0 +1,41 @@ +connect_error) { + http_response_code(500); + die("database connection failed. ".$warning); // . $conn->connect_error); + } + $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, column, obj, ua, app_version, previous_commit, ip) VALUES". + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + $stmt->bind_param("ssiisssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"], + $_REQUEST["error"]["column"], $_REQUEST["error"]["obj"], $_REQUEST["client"]["ua"], $_REQUEST["client"]["app_version"], + $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"]); + + $stmt->execute(); + + $stmt->close(); + $conn->close(); + + exit("report saved. ".$warning); +?> -- cgit v1.2.3