-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonline.php
More file actions
24 lines (15 loc) · 704 Bytes
/
online.php
File metadata and controls
24 lines (15 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
// Simple "who's online" script written by Anderson
require "setup2.inc.php";
ConnectDB();
$name = addslashes($_POST['n']);
$getUsers = mysql_query("SELECT * FROM `chat_ChatLiveUsers`") or die(mysql_error()); // gets all the users from the table
echo('<br><font face="Arial, Helvetica, sans-serif" size="2"><b><center><u>Current online users</u><br></center></b>');
while($allUsers = mysql_fetch_array($getUsers)) {
if(in_array("Anderson", $allUsers) or in_array("Cam", $allUsers) or in_array("Vortex", $allUsers) ) { // now working
echo("<center><font color=red>" . $allUsers['Name'] . "</font></center>");
} else {
echo("<b><center>" . $allUsers['Name'] . "</center></b>");
}
}
?>