From 4f56ebab83958750b2b40d55ff3abedc3406968e Mon Sep 17 00:00:00 2001 From: AB3462461320878 <117258679+AB3462461320878@users.noreply.github.com> Date: Sun, 22 Oct 2023 10:51:42 +0300 Subject: [PATCH] Create php.php --- php.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 php.php diff --git a/php.php b/php.php new file mode 100644 index 0000000..0668c5e --- /dev/null +++ b/php.php @@ -0,0 +1,27 @@ +connect_error) { + die("Connection failed: " . $conn->connect_error); + } + + $sql = "SELECT COUNT(*) as usercount FROM users"; + $result = $conn->query($sql); + + if ($result->num_rows > 0) { + $row = $result->fetch_assoc(); + echo $row['usercount']; + } else { + echo "0"; + } + + $conn->close(); +?>