Location: PHPKode > scripts > wwdbank > wwdbank/accounts/messageread2.php
<?php
Include_once('includes/session_config.php');
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

$message_id=($_POST['message_id']);

$query="SELECT *,DATE_FORMAT(date, '%D %M, %Y') AS date FROM messaging WHERE";
$query .= "( message_id='$message_id')";
$result=mysql_query($query);
$number=mysql_num_rows($result);
if ($number == 0)
{
echo "<tr valign=\"top\"><td colspan=\"3\">You have no messages.</td></tr>";
}
else
{
echo"<tr valign=\"top\"><td colspan=\"3\" height=\"20\"></td></tr>";
while ($row = mysql_fetch_array($result))
 	{	
	echo"<tr valign=\"top\"><td><b>{$row['title']}</b></a></td>";
	echo"<td><b>From {$row['from_user']}</b></td>";
	echo"<td><b>Date sent: {$row['date']}</b></td></tr>";
	echo"<td colspan=\"3\" height=\"2\"></td></tr>";
	echo"<tr valign=\"top\"><td colspan=\"3\">{$row['body']}</td></tr>";
	echo"<td colspan=\"3\" height=\"5\"></td></tr>";
	echo"<tr valign=\"top\"><td>
		<form action=\"$PHP_SELF?\" method=\"post\">
		<input type= \"hidden\" name= \"reply\" value= \"reply\" >
		<input type= \"hidden\" name= \"messaging\" value= \"messaging\" >
		<input type= \"hidden\" name= \"admin\" value= \"admin\" >
		<input type= \"hidden\" name= \"user_name\" value= \"{$_SESSION['user_name']}\" >
		<input type=\"hidden\" name=\"pass\" value=\"{$_SESSION['pass']}\">
		<input type= \"hidden\" name= \"submit\" value= \"submit\" >
		<input type= \"hidden\" name= \"title\" value= \"Re:{$row['title']}\" >
		<input type= \"hidden\" name= \"reply_user\" value= \"{$row['from_user']}\" >
		<input type= \"hidden\" name= \"from_user\" value= \"{$row['to_user']}\" >
		<INPUT TYPE=\"image\" SRC=\"../images/reply.jpg\" width=\"34\" height=\"14\"  alt=\"Reply\" BORDER=\"0\"></form></td>
		</form></td>";
		echo"<td>
		<form action=\"$PHP_SELF?\" method=\"post\">
		<input type= \"hidden\" name= \"messagedelete\" value= \"messagedelete\" >
		<input type= \"hidden\" name= \"messaging\" value= \"messaging\" >
		<input type= \"hidden\" name= \"admin\" value= \"admin\" >
		<input type= \"hidden\" name= \"user_name\" value= \"{$_SESSION['user_name']}\" >
		<input type=\"hidden\" name=\"pass\" value=\"{$_SESSION['pass']}\">
		<input type= \"hidden\" name= \"submit\" value= \"submit\" >
		<input type= \"hidden\" name= \"message_id\" value= \"{$row['message_id']}\" >
		<INPUT TYPE=\"image\" SRC=\"../images/delete.jpg\" width=\"43\" height=\"12\"  alt=\"Delete\" BORDER=\"0\"></form></td>
		</form></td><td></td></tr>";	
	
	}
	echo"<tr valign=\"top\"><td colspan=\"3\"><h3>Click the Read Messages button to view all messages.</h3></td></tr>";
	echo"<tr valign=\"top\"><td colspan=\"3\"><h3>NOTE: Clicking delete will immediately delete this message.</h3></td></tr>";
echo "</table>";
}
?>
Return current item: wwdbank