Real-time database monitor



I have built a php website with a messaging system where users of a
website can send messages to each other and they will appear in the
other users inbox for viewing next time they log in. In a bar at the
top of the page it says "Inbox (0)" if they have no new messages and,
yup, you guessed it "Inbox (2)" if they have two waiting messages. If
someone sends them a message while they are sitting on some page of
the website I would like the counter to increase. Each time someone
sends a message it creates a new record in a single table in the
database. What I am looking for is a way to monitor that database and
find any records with "msg_to" equal to the user id of the person
logged in and "msg_unread" equal to '1.' Right now the mysql query
runs each time a page is loaded so they would be notified then but I
would like it to somehow update the inbox number while they sit on a
page. Does anyone have any ideas? I was told in the comp.lang.php
group that AJAX might be able to help and that I should check this
group. Thank you in advance for your help!
.



Relevant Pages

  • Re: Real-time database monitor
    ... other users inbox for viewing next time they log in. ... the website I would like the counter to increase. ... XMLHttpObject (AJAX) is a good solution for this. ... you might want to use a frame or an IFrame. ...
    (comp.lang.javascript)
  • Re: Not Receiving my website emails in my Windows Mail Inbox.
    ... Are the missing messages found in the inbox of your personal account's webmail page? ... hosting with Network Solutions. ... confirmed that I have set up the protocols so that all my website emails are ... when I went online to Net. ...
    (microsoft.public.windows.vista.mail)
  • Re: oe6 all messages blank - suddenly not reading text of any mails
    ... I was loosing my ... mind until I found this website and your second suggestion fixed it. ... > any other message in the inbox, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: OT: Mozilla lost tons of email
    ... This restored the email file. ... That would have meant starting a separate inbox which can be a ... Look at the name of his website. ... and my Earthlink e-mail address. ...
    (sci.electronics.design)
  • Re: Outlook Express 6
    ... PJW wrote: ... > inbox and nowhere else. ... refer you to the newsgroup specifically for OE and also to a website ... MS-MVP Windows - Shell/User ...
    (microsoft.public.security.virus)