Hi,
Here's what i want to and following it is the code i have thus far.
a. I have a small message service for my users .
b. Lets say i send a message to one of them. When he logs in, he gets an alert.
c. He then reads the message.
d. Now the next time he logs in and sees his list of messages, i would like the read messages to be in blue and the unread in say, red.
e. I need help in defining the the userid as part of the array.
Here's the relevant snippet :
$seenby = $myrow["Seen_By"];
$sbArray = array_unique(explode(',', $seenby));
if ( $userid == $sbArray) // this is the error. userid can be only one of the array elements and hence the equal to sign doesnt work. So I wondered if I should use substr instead of sbArray and if so, then how would i define it to pick up only the userid i need ?
{
$name = "<span style=\"color: blue;\">$name</span>"; // defined earlier
$calcdate = "<span style=\"color: blue;\">$calcdate</span>";
$timea = "<span style=\"color: blue;\">$timea</span>";
}
else
{
$name = "<span style=\"color: red;\">$name</span>";
$calcdate = "<span style=\"color: red;\">$calcdate</span>";
$timea = "<span style=\"color: red;\">$timea</span>";
}
printf("<tr><td><input type=\"radio\" name=\"choice\" value=%d><td>
<font size=2 face=Tahoma color=#339966>%s<td>
<font size=2 face=Tahoma color=#339966>%s<td>
<font size=2 face=Tahoma color=#339966>%s<td>
</tr>",
$myrow["MID"],
$name,
$calcdate,
$timea );
and so on....
Woukd appreciate some help in that IF statement which is incorrect pl.
Thanks. Swati