Paste the source code here, it is a bit hard to debug without the source. Sounds like you might not be using the database results correctly. try a var_dump or a print_r on the row results (object or array) from the database and make sure you are calling the correct variable.
<?php
$alang28 = "Hello there";
$query5 = mysql_query("SELECT * FROM onlineusers WHERE username ='$myuser' ")
or die("Could not insert data because ".mysql_error());
$qry5 = mysql_fetch_array( $query5 );
echo "Testing $qry5[message]";
echo "Testing without database $alang28"; // Works here
?>
<?php
include "includes/config.php";
$alang28 = "Hello there";
$query5 = mysql_query("SELECT * FROM logs_staff WHERE id ='1' ")
or die("Could not insert data because ".mysql_error());
$qry5 = mysql_fetch_array( $query5 );
echo "Testing $qry5[command]<br />";
echo "again without database $alang28"; // Works here
print_r($qry5);
?> daaa
Thats whats stored in the database, it is correctly working. Update the database if you want it to display something else. If you are trying to process the variable inside the output then you shouldnt be doing it this way but you can do it like this (bewarned this isnt great security)