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(); +?>