plz help
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#5272A0"><center>
<p><font color="#FFFFFF" size="6" face="Geneva, Arial, Helvetica, san-serif"><strong>View
News</strong></font></p>
<?php
$db = mysql_connect("localhost","dingdesign","mypassword");
mysql_select_db("dingdesign",$db);
$result = mysql_query("SELECT * FROM news ORDER BY id DESC",$db);
$result2 = mysql_query("SELECT * FROM config",$db);
$num=0;
echo "<table width='75%' height='150' border='0'>\n";
echo "<td width='80%' height='21'>News</font></strong></td>\n";
echo "<td width='20%'>News</td>\n";
while($num<mysql_fetch_row($result)) {
printf("<tr bgcolor='%s'><td> <strong><font color='%s' face='Geneva, Arial, Helvetica, san-serif'>%s</font></strong></td><td> <strong><font color='%s' face='Geneva, Arial, Helvetica, san-serif'>%s</font></strong></td></tr><tr valign='top' bgcolor='%s'><td colspan='2'><font color='%s' face='Arial, Helvetica, sans-serif'>%s</font></td></tr>",mysql_result($result2,0,"barcolor"),mysql_result($result2,0,"btcolor"),mysql_result($result,$num,"subject");,mysql_result($result2,0,"btcolor"),mysql_result($result,$num,"username"),mysql_result($result2,0,"bodycolor"),mysql_result($result2,0,"mtcolor"),mysql_result($result,$num,"message"));
$num=$num+1;
}
echo "</table>\n"
?>
</center></body>
</html>