Jump to content

New Forum Posts Marker


ShoeLace1291

Recommended Posts

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";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.