From 6a342bcc7a23ce829f4d4dff6ae8b13a6458b389 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:32:13 -0700 Subject: [PATCH] Create db.php --- polls/db.php | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 polls/db.php diff --git a/polls/db.php b/polls/db.php new file mode 100644 index 0000000..c02894e --- /dev/null +++ b/polls/db.php @@ -0,0 +1,166 @@ +query("SELECT COUNT(*) FROM users")->fetchColumn(); + +// If at least one user exists, show a message and no form +if ($checkTotal > 0) { + ?> + + +
+ ++ An admin user has already been created. No additional admins can be set up here. +
++ Go back to the Polls site. +
+You can now go to the Admin page to log in.
+ + + +