Share me User Online Script Web my lord :handsdown: im just hoping if there's one can share :)
Quote:
Share me User Online Script Web my lord :handsdown: im just hoping if there's one can share :)
<?php
error_reporting(0);
$selected = mssql_fetch_array(mssql_query("SELECT * FROM RohanGame.dbo.TCharacterLogin WHERE login = WHERE ConnectStat = '1'"));
if (empty($selected)) { echo "<center>Currently there are no online characters.</center>" ;}
else
{
echo '
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="list">
<tbody>
<tr>
<td width="30">#</td>
<td>Name</td>
<td>Class</td>
<td align="center">Level</td>
<td align="center">Resets</td>
<td align="center">Online From</td>
</tr>';
$select = mssql_query("SELECT char_id, FROM RohanGame.dbo.TCharacterLogin WHERE login = '1' order by char_id desc");
for($i=0;$i < mssql_num_rows($select);++$i)
{
$row = mssql_fetch_row($select);
$rank = $i+1;
$querychar = mssql_query("Select name From RohanGame.dbo.TCharacter where id ='".$row['0']."'");
$accchar = mssql_fetch_row($querychar);
$querychar1 = mssql_query("Select Name,Class,MapNumber,clevel,resets From Character where Name='".$accchar[0]."'");
$charr = mssql_fetch_row($querychar1);
if (empty($charr['3'])) { $charr['3'] = "0" ;}
if (empty($charr['4'])) { $charr['4'] = "0" ;}
if (empty($row['1'])) { $row['1'] = "-" ;}
echo'
<tr class="top">
<td><strong>'.$rank.'</strong></td>
<td>'.character($accchar[0]).'</td>
<td align="center">'.charclass($accchar[0]).'</td>
<td align="center">'.$charr[3].'</td>
<td align="center">'.$charr[4].'</td>
<td><span onmouseover=\'return overlib("Connected: '.howlongago($row['1'],true).' ago");\' onmouseout=\'return nd();\'>'.$row[1].'</td>
</tr>';
}
echo '</tbody></table>';
}
?>
Quote:
Thanks my lord but how to pop-up that counting online user into website, i already put inside the online.php at htdocs then i refresh nothing happend, no words display. sorry for asking again because im not really good at html/php.
<?php
error_reporting(0);
include 'dbconn.php';