In inbox link i want to show how many massage are in it,in such a way if in inbox there are 20 messages and only 5 are unread then to be shown in that link.
like this Inbox(5).
Also in inbox if message is unread to be highlighted,meaning all 5 message to be highlighted.
How can i do this,i`ve seen this in facebook and other dating sites.
Anyone to help me please.

Couldn't you just have a status field in your message object? This could be used to determine whether a message has been read, unread, deleted, caught by spam filter etc.

Actually i`m new to this and i dont know anything about spam.
Can you please explain how can i get started.

You have to sort unread messages out with your own index. For example you save all read messages (with POP every mail as a unique ID defined by the server) in a simple text-file. When the user logges in you catch all emails from the server and compare the IDs with your thumb-file. Every ID that is not in the file is new. As soon as the user reads it you add the message ID to your thumb file.
When you use your own messaging-system (eg forum, etc) you can simply add a flag as darkagn proposed. That can save you much trouble.

I would do what darkagn said and just have a status field since I assume you are using a database, then it would just be a select count(messageid).

yeah i used Darkan idea,it works.
Thankx much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.