This commit is contained in:
Andrew Trieu
2023-02-10 19:20:34 +02:00
parent c717c9e4c1
commit 5f98bab91e
23 changed files with 586 additions and 325 deletions

14
php/users.php Normal file
View File

@@ -0,0 +1,14 @@
<?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;
?>