i have more than one users in my system. And everyone can update status and comment. So how can i set comment as unread for particular users if he diid not see comment. like everyone have same notification in them dashboard but if particular user see comment then comment text will display in black color other not seen then it will display in red color . This thing is like every users. Let me know how can i make this thing in php coding. looking forward your help. Thanks PHP Development
Normaly you just send all users the same message but that's not handy if you have more then 10.000 users as the preformance will get slower and slower If you have global messages that you want to display to all users but doesn't want to display it to users that already have seen them, try to add another table to your database that will hold data towards those messages. For example a table message_id (for global messages) user_id (to connect the user) readdate (date when user has read this message). If the message expires you can remove all the data from that table. Hope you get my idea.
All comments are unread for everybody when created. Then you can mark read comments for each user in 2 ways: 1. on server in a table or file, you need a record with comment id and user id that shows it was read 2. save a cookie with comment id on that user's computer (unreliable but easier)