Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 543
0 Users 5 Guests Online
Forum Index » PHP + MySQL » question about the system pm
Posted on Saturday 2nd August 2008 at 08:22 PM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
how can I do if a user is logged out what's new pm he has logged so if he is to be because you are 5 new news how can I do?
Posted on Saturday 2nd August 2008 at 11:34 PM
Adam981
templates/default/images/noavatar.png's Avatar
Junior Member
HUH?! try to explain alittle better please so we can help :)
Posted on Sunday 3rd August 2008 at 09:10 AM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
Inbox (0)



new mail wenn user is logget in
Posted on Monday 4th August 2008 at 03:00 PM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
Adam981 ??? can you help me?
Posted on Saturday 9th August 2008 at 01:34 PM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
Adam981 ???
Posted on Saturday 9th August 2008 at 04:33 PM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
Try explaining a bit better. We cannot understand you.
Posted on Saturday 9th August 2008 at 07:11 PM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
I would have if a user logged, it is the message you get 5 new pm's or you 2neue's pm depending on how much he's new pm!


so Inbox (5) <<<
Posted on Sunday 10th August 2008 at 08:27 AM
UrbanTwitch
templates/default/images/noavatar.png's Avatar
Senior Member
Oh. So if the user has 1 or more PMs in their inbox. Make it attract attention; like red text? Right?

PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
PUT HTML/MEMBER STUFF";
$getnew = mysql_query("SELECT * FROM `privates` WHERE `status` = 'Unread' AND `to` = '$logged[username]';"); 
$total = mysql_num_rows($getnew); 
$select = mysql_query("SELECT * FROM `privates` WHERE `status` = 'Unread' AND `to` = '$logged[username]' ORDER BY `to` ASC LIMIT 0 , 30");
$array = mysql_fetch_array($select);
$amount = mysql_num_rows($select);

if($amount >= 1) {
    echo "<ol><li><a  style='color:red' href='http://sodadome.com/inbox.php'>($total)  New Message</a></li>";
} else  {
    echo "<li><a href='http://sodadome.com/inbox.php'>($total) New Messages</a></li>";
}
echo "


Enjoy.
Posted on Sunday 10th August 2008 at 08:28 AM
UrbanTwitch
templates/default/images/noavatar.png's Avatar
Senior Member
Also, you can edit the links like sodadome.com, etc and edit the text to your liking. :)
Posted on Sunday 10th August 2008 at 09:31 AM
schorsch
templates/default/images/noavatar.png's Avatar
Active Member
thx!




many thanks as I wanted to have it!