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? Quote Link to comment 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"; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.