if ( $action == "read" ) {
$message=$_GET['num'];
mysql_connect('localhost',$usersql,$passsql);
@mysql_select_db(centmtg_db3) or die( "Unable to select database");
$query="SELECT * FROM pms_messages WHERE id = '$message' LIMIT 1";
$result=mysql_query($query) or die(mysql_error());
$to=mysql_result($result,0,"recipient");
$sender=mysql_result($result,0,"sender");
$subject=mysql_result($result,0,"subject");
$date=mysql_result($result,0,"date");
$new=mysql_result($result,0,"unread");
$body=mysql_result($result,0,"body");
$date = date(" n-j-y g:ia", $date);
$body=nl2br($body);
if ( $to == $_SESSION['email'] ) {
require("include/menubar.php");
$query2="UPDATE pms_messages SET unread = 'FALSE' WHERE id = '$message'";
$result2=mysql_query($query2) or die(mysql_error());
print " <table width=\"400\">
<tr class=\"odd\"><a href=\"http://www.centmtg.net/message.php?id=inbox\">Inbox</a>
               
<a href=\"http://www.centmtg.net/message.php?id=compose\">Compose</a>
<tr class=\"odd\"><strong>From:</strong> ".$sender."</tr>
<tr class=\"odd\"><strong>Date:</strong> ".$date."</tr>
<tr class=\"odd\"><strong>Subject:</strong> ".$subject."</tr>
<tr class=\"odd\"><strong>Message</strong><br /></tr>
$body<br />";
}
}
$body=nl2br($body); <---- fixed the problem
Edited, Thu Jan 15 10:15:34 2004 by Murth