Cant get it to work with PHPbb View latest post codes?
-
I try to show latest post on a widget but many of the plugins dont have the option i want also they arent pretty at my sites theme
i there wanted to use a code there are working on normal pages.
I try to use this code
?php $connect = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die(mysql_error()); mysql_select_db('databasename') or die(mysql_error()); $query = "SELECT forum_id, topic_id, post_id, post_subject FROM phpbb_posts WHERE post_approved='1' ORDER BY post_time DESC limit 10"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<a href=\"/forum/viewtopic.php?f={$row['forum_id']}&t={$row['topic_id']}&p={$row['post_id']}#p{$row['post_id']}\">".$row['post_subject']."</a><br />"; } mysql_close($connect); ?>
But it dont show anything.
- The topic ‘Cant get it to work with PHPbb View latest post codes?’ is closed to new replies.