This repository has been archived on 2025-12-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
chatline/php/users.php
Andrew Trieu 5f98bab91e Finalize
2023-02-10 19:20:34 +02:00

14 lines
403 B
PHP

<?php
session_start();
include_once "config.php";
$current_user = $_SESSION['unique_id'];
$sql = "SELECT * FROM users WHERE NOT unique_id = {$current_user} ORDER BY user_id DESC";
$query = mysqli_query($conn, $sql);
$output = "";
if (mysqli_num_rows($query) == 0) {
$output .= "No users are available to chat";
} elseif (mysqli_num_rows($query) > 0) {
include_once "list.php";
}
echo $output;
?>