<?php
include("connect.php");
$x=1;
$sql = "SELECT * FROM tbl_memo ORDER BY id DESC";
$rs = mysql_query($sql) or die("Invalid Query <br>$sql");
// Mysql_num_row is counting table row
while($row = mysql_fetch_array($rs))
{
if($x <= 4)
{
echo'<font style="font-family:Arial;font-size:12px;color:#000000">'.'<br/>To:'.' '.$row['to'].'</font><br/>';
echo'<font style="font-family:Arial;font-size:12px;color:#000000">'.'From:'.' '.$row['from'].'</font><br/>';
echo'<font style="font-family:Arial;font-size:12px;color:#000000">'.'Subject:'.' '.$row['subject'].'</font><br/>';
echo'<font style="font-family:Arial;font-size:12px;color:#000000">'.'Date:'.' '.$row['date'].'</font><br/>';
echo'<font style="font-family:Arial;font-size:12px;color:#000000">'.'Ref#:'.' '.$row['refNum'].'</font><br/>';
echo'<font face="Tahoma" size="1" color="black"><a href="allcont1.php?id='.$row['id'].'" <B>Read more</B></a></font><br/><br/>';
}
$x=$x+1;
}
?>
No comments:
Post a Comment