Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once ( 'config.php');
- $cxn = mysql_connect($Hostname, $Username, $Password);
- $db = mysql_select_db ($CharDatabase,$cxn);
- if (!$db) {
- die ('Error : ' . mysql_error());
- }
- $characters_online = mysql_query("SELECT * FROM `characters` WHERE `online` = '1'");
- $online_players = mysql_num_rows($characters_online);
- if ($online_players > 0) {
- echo '<strong><font color=#138f39>Players online :<br> '.$online_players.' </font></strong>';
- }else
- {
- echo '<strong><font color=#af1e1e>There are no players <br> online</font></strong>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement