chatlog.php

MySQLMud/www/chatlog.php · 743 B

From the archive MySQLMud.tar.gz

Download the archive   « Back to the archive contents

<?
include("config.inc.php");
include("header.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM vand_chatlog";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();


echo "<title>Vandagard Chatlog</title.";
echo "<b><center>Recently heard on Vandagard..</center></b><br><br>";
echo "<border=\"2\" cellspacing=\"10\" cellpadding=\"1\"";

$i=0;
while ($i < $num) {

$time=mysql_result($result,$i,"time");
$channel=mysql_result($result,$i,"channel");
$who=mysql_result($result,$i,"who");
$text=mysql_result($result,$i,"text");

echo "<TR>";
echo "<TD>$time</TD> <TD>$text</TD><br>";
echo "</TR>";

$i++;
}

echo "</table>";

?>

Site Stats

Snippets: 1791
Codebases: 571