I haven't seen this on any site so...
I know this is easy...
But I take a shit on it ;)
This script displays the currently online characters...
PHP Code:<!--
****************************
* Made By Lifeless... *
* If you leech it *
* Then no other releases! *
* I'm tired of you noobs *
* ........................ *
****************************
-->
<table style="border-width:medium; border-style:dashed">
<tr>
<td style='text-align:left;'>Name</td>
<td style='text-align:right;'>Level</td>
</tr>
<?php
include 'connection.php'; //We need to connect to DB eh?
$_blabla = mssql_query("SELECT * FROM Account WHERE LastLoginTime > LastLogoutTime"); //Check if someone is still online
while($kurvanagylofasz = mssql_fetch_array($_blabla)){ //Simple fetch shit...
$aid = $kurvanagylofasz['AID'];
$getChar = mssql_query("SELECT TOP 1 * FROM Character WHERE AID = \"$aid\" ORDER BY LastTime DESC"); //Get the last char used by the account
while($faszom = mssql_fetch_array($getChar)){ //A simple fetch again....
/*And here we can print out what we want about the character...
* Feel free to edit this part...
*/
echo "<tr>
<td style='text-align:left;'>".$faszom['Name']."</td>
<td style='text-align:right;'>".$faszom['Level']."</td>
</tr>";
}
}
?>
</table>

