summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/report/index.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/report/index.php b/server/report/index.php
index c0ac172..6763a29 100644
--- a/server/report/index.php
+++ b/server/report/index.php
@@ -26,6 +26,20 @@
http_response_code(500);
die("database connection failed. ".$warning); // . $conn->connect_error);
}
+
+ $query = "CREATE TABLE IF NOT EXISTS error_reports (
+ msg VARCHAR(420) ,
+ url VARCHAR(420) ,
+ line INT ,
+ column INT ,
+ obj VARCHAR(420) ,
+ ua VARCHAR(420) ,
+ app_version VARCHAR(420) ,
+ previous_commit VARCHAR(69) ,
+ ip VARCHAR(69) ,
+ )";
+ $result = mysqli_query($dbConnection, $conn);
+
$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"],