I have built 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. 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? Thank you in advance for your help!