Now you're getting it. Now I'll fix up that coding =P
Btw, I honestly don't know how you got a proper looking table doing that. You start a row (<tr>), then end one repeatedly in the while loop, without ever making new ones.
Also, you're using an inefficient and not very reliable way of checking how many people are online. The one I already gave you can be used for both of what you're trying to do at the same time.
PHP:
<?php
$link = @mssql_connect("Pc Database", "Name", "Passy") or die ("Error!");
$query = mssql_query('SELECT m_szName, m_nLevel FROM [CHARACTER_01_DBF].[dbo].[CHARACTER_TBL] WHERE [MultiServer] != 0;');
echo '<div align="center"><table width="50%" border="1" bgcolor="#BBBBBB" style="text-align:center;">';
echo '<th>Player Name</th>';
echo '<th>Player Level</th>';
$online = mssql_num_rows($query);
echo $online." players are online. <br /><br />";
// Here's the proper way to do an If statement
if( $online > 0 )
{
//loop through the rows
while( $data = mssql_fetch_assoc($query) )
{
//loop through elements (ie td's)
echo '<tr><td>'.$data['m_szName'].'</td>';
echo '<td>'.$data['m_nLevel'].'</td></tr>';
}
}
echo '</table>';
?>
Here's a small explanation of the If statement. The part in parenthesis is the key. If whatever is inside that, evaluates to true (like $online being greater than 0) then everything in the braces ( {} ) will be executed. If you don't use braces, then the if statement will only apply to the line immediately after the if statement.