Isn't there an AJAX function to do so? Or maybe a MySql function?
The only way is keep checking the database all the time? Doesn't it spend too much of the server?
My page will work like a Messenger.
You need to understand that what happens on the server and what happens on the client are completely separated, and while the client has a straight-forward way to contact the server, the converse is not true. There's no way any MySQL function could possibly refresh the browser on the client machine.