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

Recommended Answers

All 3 Replies

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.

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.