while($row = mysql_fetch_array($result)) {
$userid = $row['userid'];
$subject = $row['subject'];
$timestamp = $row['post_date'];
$post_date=date("l, F jS h:i:s a T Y", time($timestamp));
$body = $row['body'];
$db_name = "diablo";
$table_name = "users";
$connection = mysql_connect("65.26.138.33", "username", "password") or die(mysql_error());
$db = mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "
SELECT *
FROM $table_name
WHERE userid = \"$userid\"
";
$result_one = mysql_query($sql, $connection) or die(mysql_error());
while($row_one = mysql_fetch_array($result_one)) {
$username = $row_one['username'];
}
?>
<table bordercolor=#CCCCCC cellspacing=0 cellpadding=0 width=425
border=1 align="center" bgcolor="#000000">
<tbody>
<tr>
<td class=nobordercell bgcolor=#084e84> » News - (<? echo "$username"; ?>)</td>
</tr>
<tr>
<td class=nobordercell width="25%">
<div align="left">
<table width="100%" border="0" align="center">
<tr>
<td height="19">
<p><font size="2" color="#FFFFFF"><center><b><? echo "$subject"; ?></b></center><br><? echo "$body"; ?></font></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class=nobordercell width="25%" bgcolor="#084e84">
<div align="left"> » <? echo "$post_date"; ?></div>
</td>
</tr>
</tbody>
</table>
<?
}
?>