5 most recent topics on index page?

Hi again, I use the phpbb forum just like this one on my site, but i’d like to show the 5 most recent topics on my index page so when members login they can see the 5 most recent topics and click on them to go straight to the forum.

I’ve seen this done on other sites, but i’m new to php programming (new to programming altogether actually) and i’m not sure where to start or think of the question to look this up. It appears as a “programming newbie” applying the logical to a problem is the hardest part…could anyone help please?

I’m pretty pleased with how my progress is coming but i’m a bit stumped on this…

Is it possible?



you will need to search through your database and find the 5 most recent posts (look at the timestamps of insertion and retrieve them with the SQL. Hint: SELECT, ORDER BY and LIMIT).

Depending on how new you are to PHP, MySQL and SQL, I can give you links to tutorials to help you out.

http://www.codewalkers.com -> tutorials -> basics -> “Creating Dynamic Websites with PHP and MySQL”

Databases in general - http://www.geekgirls.com/menu_databases.htm

SQL - http://www.sqlcourse.com/

Thanks lig…i’m very new…to say the least…lol

i dont have phpBB installed anymore, or else this would be more accurate…

you SQL will be something like this


that will sort the rows by date, and spit out the five newest rows, then youll nee to do a loop and make a pretty HTML table.

hope this helps.

Thankyou…i’m on it!

Sponsor our Newsletter | Privacy Policy | Terms of Service