$i = 1 ;
$SQL = "SELECT DATE_FORMAT(Date_Sent, '%M %d, %Y') as newDate,TIME_FORMAT(Time_Sent, '%l:%i %p') as newTime, messages.ID as MID,messages.*, Last_Name,First_Name,users.ID from messages,users where (users.ID = messages.From_ID) and (((To_ID = '" . $_SESSION["sessionUserID"] . "') and (messages.ID = '" .$_REQUEST["id"] . "')) or ((Reply_ID = '" . $_REQUEST["rep"] . "') and ($_REQUEST[rep] > 0 ) )) ORDER BY messages.TXN_TS DESC";
$resultMsg = mysql_query($SQL) or die(mysql_error());
while($myrowMsg=MySQL_fetch_array($resultMsg)){
$MID =$myrowMsg["MID"];
$Last_Name =ucfirst($myrowMsg["Last_Name"]);
$First_Name =ucfirst($myrowMsg["First_Name"]);
$The_Text =$myrowMsg["The_Text"];
$Date_Sent =$myrowMsg["newDate"];
$Time_Sent =$myrowMsg["newTime"];
$Mark_As_Read =$myrowMsg["Mark_As_Read"];
if($i =="3"){$i = 1;}
?>
>re:
=$myrowMsg["msg_title"]?>
from
if($myrowMsg["From_ID"] == $_SESSION["sessionUserID"]){?>
You
} else {?>
=$First_Name?>
=$Last_Name?>
}?>
| RECEIVED ON
=$Date_Sent?>
AT
=$Time_Sent?>
|
>
= nl2br($The_Text)?>
|
> |
$i ++ ;
}?>
|