thanks for ur reply PallaviDalvi
ok i think i'v changed somthing that i shouldnt have... everything works exept $title
i get:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in D:\WebServer\www\main\IV\last5posts.php on line 31
Where $title is ment to be...
my code now...
<?php
error_reporting(E_ALL ^ E_NOTICE);
$server="localhost";
$username="*******";
$password="*******";
$database="*******";
mysql_connect($server,$username,$password);
@mysql_select_db($database) or die( "Sorry But There Seems To Be A Problem Connecting To The Database");
$query="SELECT * FROM ibf_posts ORDER BY pid DESC LIMIT 5";
$result=mysql_query($query);
$queryforum="SELECT * FROM ibf_topics WHERE tid=$ID";
$resultforum=mysql_query($queryforum);
$i=0;
while ($i < 5) {
$ID=mysql_result($result,$i,"topic_id");
$poster=mysql_result($result,$i,"author_name");
$info=mysql_result($result,$i,"post");
$title=mysql_result($resultforum,$i,"title");
echo "<body bgcolor=\"#292e28\">"
."<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"
."<tr>"
."<td>"
."<p style=\"margin-top: 0; margin-bottom: 0\"><b>"
."<font color=\"#6f9949\" face=\"Verdana\" size=\"2\">$title</font></b></td>"
."</tr>"
."<tr>"
."<td>"
."<p style=\"margin-top: 0; margin-bottom: 0\">"
."<font color=\"#CCCCCC\" face=\"Verdana\" size=\"2\">$poster</font></td>"
."</tr>"
."<tr>"
."<td>"
."<p style=\"margin-top: 0; margin-bottom: 0\">"
."<font color=\"#CCCCCC\" face=\"Verdana\" size=\"2\">$info</font></td><BR>"
."</tr>"
."</table>"
."</body>";
$i++;
};
mysql_close();
?>