Well here is the code what i using to show the last post on my site. It's very easy to use. You most only change the mysql database info, and its working.
Here it is:
When you have the standard prefix (vb_ then you most edit forumthread into vb_thread. Did you have an another prefix, then you edit this into that. Did you not sure what your prefix is? Look then in your database and fill in the prefix what you see dear.
Have luck, and for a preview you can look on this site: Het-Legioen.nl - Woorden én daden
Good luck, and hope you like it.
Here it is:
PHP:
<?php
$limiet = 10; //Aantal topics
$pad = "http://www.het-legioen.nl/forum/"; // Pad naar forum (met slash)
//Here change the mysql!
mysql_connect(localhost,dbname,password) or die(mysql_error());
mysql_select_db(dbname) or die(mysql_error());
$aSql = "SELECT * FROM forumthread ORDER BY lastpostid DESC LIMIT 0,$limiet";
$aQuery = mysql_query($aSql);
while ($aShow = mysql_fetch_object($aQuery))
{
echo "<a href=\"".$pad."showthread.php?p=".$aShow->lastpostid."#".$aShow->lastpostid. "\" target=\"_BLANK\">» ".$aShow->title."</a><br />" ;
}
?>
When you have the standard prefix (vb_ then you most edit forumthread into vb_thread. Did you have an another prefix, then you edit this into that. Did you not sure what your prefix is? Look then in your database and fill in the prefix what you see dear.
Have luck, and for a preview you can look on this site: Het-Legioen.nl - Woorden én daden
Good luck, and hope you like it.