First, credits to Me(Matthew1) and Drakia from osRose.
Config.php for all
Code:<?php $dbhost = "localhost"; // Change this to your database server $dbname = "roseon"; // Change this to your database name $dbuser = "roseon"; // Change this to your database username $dbpswd = "roseon"; // Change this to your database password ?>
Online Players
Code:<?php include("config.php"); // Connect to the database $db = mysql_connect($dbhost, $dbuser, $dbpswd) or die("Could not connect to server database"); mysql_select_db($dbname, $db); // Select all the banned users and display them $result = mysql_query("SELECT * FROM accounts WHERE online = '1'", $db) or die(mysql_error()); while($row = mysql_fetch_array( $result )) { echo "<strong>".$row['lastchar']."<BR></strong>"; } mysql_close($db); ?>
Banned Players
Code:<?php include("config.php"); // Connect to the database $db = mysql_connect($dbhost, $dbuser, $dbpswd) or die("Could not connect to server database"); mysql_select_db($dbname, $db); // Select all the banned users and display them $result = mysql_query("SELECT * FROM accounts WHERE accesslevel = '0'", $db) or die(mysql_error()); while($row = mysql_fetch_array( $result )) { echo "<strong>".$row['username']."<BR></strong>"; } mysql_close($db); ?>



Reply With Quote![[Release]Players Online and Banned players [PHP]](http://ragezone.com/hyper728.png)

