Looks like you know the IDs beforehand which are to be rejected. Then do this in the first query -
$recent = mysql_query("SELECT * FROM forum_posts where forum_id NOT IN (24, 25, 35) ORDER BY post_time DESC LIMIT 5"); 
Still fetches 5 results excluding the unwanted
And following is the consolidated query which does the same task as done by your 3 queries
$recent = mysql_query("SELECT fposts.username FROM forum_posts as fposts INNER JOIN forum_topics AS ftopics ON (ftopics.topic_id = fposts.topic_id)
INNER JOIN forum_users AS fusers ON (fusers.user_id = forum_posts.poster_id)
WHERE fposts.forum_id NOT IN (24, 25, 35) ORDER BY fposts.post_time DESC LIMIT 5");
while ($recent_row = mysql_fetch_assoc($recent))
{
     echo "$username posted in \"". "$recent_row['username']\""; 
}
                  sandeepan
                   2010-09-03 22:50:06