Ok i no the problem it is the while loop it goes over the same result over and over again i think it is the 2 public function and for some reason it loops over the same result (i think) and it cause browser (FireFox) to crash.
<?php
class player
{
public function onlinePlayers(){
global $cxn;
$sql = "SELECT * FROM `characters` WHERE `online`='1'";
@$result = mysqli_query($cxn, $sql);
if(@mysqli_num_rows($result)){$onlinePlayers=mysqli_num_rows($result);}
else{$onlinePlayers="0";}
return $onlinePlayers;
}
public function onlineGM(){
global $cxn;
$sql = "SELECT * FROM `accounts` WHERE `gm`!=''";
$result = mysqli_query($cxn, $sql);
$i=0;
while(@$row = mysqli_fetch_assoc($result)){
$sql = "SELECT * FROM `characters` WHERE `acct`='".$row['acct']."' AND `online`='1'";
@$result = mysqli_query($cxn, $sql);
if(@mysqli_num_rows($result)){$i++;}
}
return $i;
}
}
$playerStat = new player;
?>