Hi to all, I am asking on behalf for my best friend. The question is how to create a pm alert notice just like this site

8 Years
Discussion Span
Last Post by SheSaidImaPregy

Database wise:

Create a table that holds the messages, with at least the message, userid to send it to, userid who sent it, and "read date" or read flag. When a user sends the message, you can then populate the message, userid who sent it, userid who sent to. When the user who is receiving the message logs in, do a query for messages to that user where the read date is null or the flag is false. Show all messages returned, or a button to lead them to the page to view the messages.


Thanks for the reply. From what i have noticed - whenever a pm is being send out to a specific user. There's an immediate request prompt box for that user to read the pm .


That method can only be done via ajax, and a loop triggering a database query. Your best bet would be to check for messages on page_load. If there is a message, show an alert. I believe that is how it is handled here as well. You only receive that new message alert when you trigger a page_load.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.