Jump to content

Recommended Posts

Posted

yes ofc but i want same php codes like Online Players etc..

 

 

 

<?php
//---------CONFIGS---------//
$title="Online Players";  // Page Title Here (Leave blank if you include this to another page)
$server="127.0.0.1"; // MySQL IP
$user="root"; //MySQL Username
$password="blabla"; //MySQL Password
$database="l2jdb"; //MySQL Database
//-----END OF CONFIGS-----//
if ($title) {
print("<head><title>$title</title></head>");
}
else {
print("<head><title>title here</title></head>");
}
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

$result = mysql_query("SELECT char_name,title,pvpkills,pkkills FROM characters where online=1 and accesslevel=0 order by pvpkills desc") 
or die(mysql_error());  
$row_sql = mysql_fetch_assoc($result);
$total = mysql_num_rows($result);
echo "<center><h3>Online Players: $total </h3></center><table border=1 align=center><tr> <th>Character</th> <th>Title</th> <th>PvP Kills</th> <th>PK Kills</th> </tr>";

while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$title = $row['title'];
	$pvp = $row['pvpkills'];
	$pk = $row['pkkills'];
	echo "<tr><td align=center>$name</td><td align=center>$title</td><td align=center>$pvp</td><td align=center>$pk</td></tr>"; 

	}
echo "</table>";

?>

Online players on site , done.(?)

 

 

 

Posted

 

 

<?php
//---------CONFIGS---------//
$title="Online Players";  // Page Title Here (Leave blank if you include this to another page)
$server="127.0.0.1"; // MySQL IP
$user="root"; //MySQL Username
$password="blabla"; //MySQL Password
$database="l2jdb"; //MySQL Database
//-----END OF CONFIGS-----//
if ($title) {
print("<head><title>$title</title></head>");
}
else {
print("<head><title>title here</title></head>");
}
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

$result = mysql_query("SELECT char_name,title,pvpkills,pkkills FROM characters where online=1 and accesslevel=0 order by pvpkills desc") 
or die(mysql_error());  
$row_sql = mysql_fetch_assoc($result);
$total = mysql_num_rows($result);
echo "<center><h3>Online Players: $total </h3></center><table border=1 align=center><tr> <th>Character</th> <th>Title</th> <th>PvP Kills</th> <th>PK Kills</th> </tr>";

while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$title = $row['title'];
	$pvp = $row['pvpkills'];
	$pk = $row['pkkills'];
	echo "<tr><td align=center>$name</td><td align=center>$title</td><td align=center>$pvp</td><td align=center>$pk</td></tr>"; 

	}
echo "</table>";

?>

Online players on site , done.(?)

 

 

 

what's this?

 

 

while($row = mysql_fetch_array( $result )) {

$name = $row['char_name'];

$title = $row['title'];

$pvp = $row['pvpkills'];

$pk = $row['pkkills'];

Posted

 

 

<?php
//---------CONFIGS---------//
$title="Online Players";  // Page Title Here (Leave blank if you include this to another page)
$server="127.0.0.1"; // MySQL IP
$user="root"; //MySQL Username
$password="blabla"; //MySQL Password
$database="l2jdb"; //MySQL Database
//-----END OF CONFIGS-----//
if ($title) {
print("<head><title>$title</title></head>");
}
else {
print("<head><title>title here</title></head>");
}
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

$result = mysql_query("SELECT char_name,title,pvpkills,pkkills FROM characters where online=1 and accesslevel=0 order by pvpkills desc") 
or die(mysql_error());  
$row_sql = mysql_fetch_assoc($result);
$total = mysql_num_rows($result);
echo "<center><h3>Online Players: $total </h3></center><table border=1 align=center><tr> <th>Character</th> <th>Title</th> <th>PvP Kills</th> <th>PK Kills</th> </tr>";

while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$title = $row['title'];
	$pvp = $row['pvpkills'];
	$pk = $row['pkkills'];
	echo "<tr><td align=center>$name</td><td align=center>$title</td><td align=center>$pvp</td><td align=center>$pk</td></tr>"; 

	}
echo "</table>";

?>

Online players on site , done.(?)

 

 

 

+1

Guest
This topic is now closed to further replies.
×
×
  • Create New...