Hello L2TopZone Members Because We Don't Have Design Section I Add This Share Here:
config.php
<?php
$database_info = array(
'host' => 'localhost',
'user' => 'root',
'password' => 'some_password',
'l2jdb' => 'l2jdb'
);
?>
databaseinfo.php
<?php
@mysql_connect($database_info['host'], $database_info['user'], $database_info['password']) or die(mysql_error());
@mysql_select_db($database_info['l2jdb']) or die(mysql_error());
?>
toppvp.php
<?php
// Connection
include 'config.php';
include 'databaseinfo.php';
?>
<?php
echo "<table>";
$query = "SELECT * FROM characters WHERE accesslevel = 0 ORDER BY pvpkills DESC limit 10"; //change 10 to whatever amount you want to show on your website.
//Connection CMD
$result = mysql_query($query) or die(mysql_error());
// loops results
while ($row = mysql_fetch_array($result))
{
//Adding Variables like a boss!
$name = $row['char_name'];
$level = $row['level'];
$pvpscore = $row['pvpkills'];
$pkscore = $row['pkkills'];
// Inserting data into the table
echo "
<tr>
<td>$name</td>
<td>$level</td>
<td>$pvpscore</td>
<td>$pkscore</td>
</tr>";
}
echo "</table>";
//closing mysql connection
mysql_close();
?>
You will need to add the HTML table yourself, it is all set up though, it displays as NAME LEVEL PVP PK
Enjoy.
Credits : L2CYBER TEAM
Linkback: https://l2topzone.com/forum/index.php?topic=2365.0