ShoeLace1291 Posted April 10, 2007 Share Posted April 10, 2007 How would I use a database to make a feature where a certain image is displayed if there have been new posts made since the user last visited that forum and a different image is displayed if there haven't been new posts made? Link to comment https://forums.phpfreaks.com/topic/46368-new-forum-posts-marker/ Share on other sites More sharing options...
esukf Posted April 10, 2007 Share Posted April 10, 2007 If you only want to check if any new post are made since last login, you can do the following. Add a last_login column on the user table in the database and change your login script to add a timestamp of when they login in. On the page where you want to display the check, check the last post timestamp against the last_login timestamp. <?php if($latest_post > $last_login){ echo "new post(s) since you last login"; } else { echo "no new posts"; } ?> Link to comment https://forums.phpfreaks.com/topic/46368-new-forum-posts-marker/#findComment-225653 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.