Okay, i've been developing forum app for my use, and now i'm quite ready, though, there is still one problem to be solved. What's the most sensible way to do "new posts" -function. For example, in this PhpBB, there's different colour icons on the left, depending whether or not there's new posts in topic.
I've tried to google this, but i think i'm using stupid keywords for searches. So, please, can someone help me?
Regards,
Kalle
Forum & new posts function
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
The easiest way would probably be within your while statement.
Eg.
Eg.
Code: Select all
while($row = mysql_fetch_array($result){
if($user_last_login < $post_last_reply){
echo '<img src="newpost.gif">';
//OTHER STUFF
}
else{
echo '<img src="oldpost.gif">';
//OTHER STUFF
}
}