Gast Posted April 13, 2006 Share Posted April 13, 2006 For a web project I am working on, I need to have a messaging system, pretty much like any PM system on a forum. I dont want a forum however...I can manage the sending and storing of messages in the database. How would I get te system to show new messages, such as in bold or highlighted, or with a small image when they havent read it? Would it be as simple as having a field in the database tat is set to 0 to start with (as in not read) and they view it, set it to 1 (as in read)? Would there need to be anything done with sessions?TIANiall Quote Link to comment Share on other sites More sharing options...
wisewood Posted April 13, 2006 Share Posted April 13, 2006 I created something the same just last week. This is pretty much what i did.My table has a field which is updated with 1 whenever a message is read... then in the inbox i have something like this;if($read<1) {$image="<img src=images/unread.jpg>"} else {$image="<img src=images/read.jpg>"}For mine, unread is an illuminated lighbulb, and read is not illuminiated. I didnt do anything with sessions Quote Link to comment Share on other sites More sharing options...
Gast Posted April 13, 2006 Author Share Posted April 13, 2006 [!--quoteo(post=364338:date=Apr 13 2006, 11:12 AM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Apr 13 2006, 11:12 AM) [snapback]364338[/snapback][/div][div class=\'quotemain\'][!--quotec--]I created something the same just last week. This is pretty much what i did.My table has a field which is updated with 1 whenever a message is read... then in the inbox i have something like this;if($read<1) {$image="<img src=images/unread.jpg>"} else {$image="<img src=images/read.jpg>"}For mine, unread is an illuminated lighbulb, and read is not illuminiated. I didnt do anything with sessions[/quote]Cool, thanks. :) 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.