I run a privateworld of warcraft server and i am trying to get a playeronline script to work in my forum home.. or in my custom template flash in header.. if you go to my website www.eternalvendetta.net and look down where the 2 flash advertisments are.. between them and the test above im trying to get a phpscript to work that JUST shows the player online count. the script i pulled from a functioning webpage. but when i put it in my custom template i get just oddness.. and it messes up the page display properties.. really screws things up.. anyone have any ideas how i would do this..
you will see an example of what im wanting to do there..
the database name is mangos for the playeronline count. its really the important database. .
<?php
//Mysql server: Host name
$mysql_host = "PRIVATE";
//Mysql server: PRIVATE
$mysql_username = "PRIVATE";
//Mysql server: PRIVATE
$mysql_password = "PRIVATE";
//Mysql server: PRIVATE
$mysql_realm_db = "PRIVATE";
//Mysql server: The PRIVATE
$mysql_mangos_db = "PRIVATE";
?>
ABOVE.. PARTIAL OF THE CONFIG.PHP
<?php
session_start();
include "config.php";
//DB
$connect_to_db = mysql_connect($mysql_host, $mysql_username, $mysql_password);
mysql_select_db ($mysql_realm_db, $connect_to_db);
//Get step
?>
<?php
mysql_select_db ($mysql_mangos_db, $connect_to_db);
//Print online how many
$query_online = mysql_query("SELECT * FROM `character` WHERE `online` ='1'");
while ($result = mysql_fetch_array($query_online)){
$online++;
}
if (!$query_online){
$online = 0;
}
echo "<b>$lang[playersonline] ($online)</b><br />";
echo "<div>";
}
echo "</table>";
?>
ABOVE CODE I USED TO DISPLAY THE DATA..
you will see an example of what im wanting to do there..
the database name is mangos for the playeronline count. its really the important database. .
<?php
//Mysql server: Host name
$mysql_host = "PRIVATE";
//Mysql server: PRIVATE
$mysql_username = "PRIVATE";
//Mysql server: PRIVATE
$mysql_password = "PRIVATE";
//Mysql server: PRIVATE
$mysql_realm_db = "PRIVATE";
//Mysql server: The PRIVATE
$mysql_mangos_db = "PRIVATE";
?>
ABOVE.. PARTIAL OF THE CONFIG.PHP
<?php
session_start();
include "config.php";
//DB
$connect_to_db = mysql_connect($mysql_host, $mysql_username, $mysql_password);
mysql_select_db ($mysql_realm_db, $connect_to_db);
//Get step
?>
<?php
mysql_select_db ($mysql_mangos_db, $connect_to_db);
//Print online how many
$query_online = mysql_query("SELECT * FROM `character` WHERE `online` ='1'");
while ($result = mysql_fetch_array($query_online)){
$online++;
}
if (!$query_online){
$online = 0;
}
echo "<b>$lang[playersonline] ($online)</b><br />";
echo "<div>";
}
echo "</table>";
?>
ABOVE CODE I USED TO DISPLAY THE DATA..
Comment