Jump to content

[SOLVED] how does flag work?


ted_chou12

Recommended Posts

well i would assume once u click one of the rows which output all messages in the inbox then the word "read" is added to a database. that way, simple if/else statements can help determine if there is a new/unread message in the inbox.
[code]
<?php
if($row['read']="read"){
//if the the word read is found in the column read (meaning the user has read this message, then the font color
//is black
echo'<font color="#000000"><a href="inbox.php?messageid=$id">$messagename</a>';
}else{
//however, if read is not found in the read column then the font is red
echo'<font color="#FF0000"><a href="inbox.php?messageid=$id">$messagename</a>';
//this is probably what the code would look like
?>
[/code]

HoTDaWg
[quote author=chronister link=topic=121069.msg497305#msg497305 date=1167978843]
IF you end up with 500 members, do you really want to mess with 500 tables??

If that is not a problem, then go ahead, but the more efficient way of doing it would be to have 1 table for the pm's and then link each pm to the user(s) with an id.


[/quote]
thank you for completely saying what i could not say :)

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.