php check function

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello all,

I want to have a PHP script to open a popup on the right bottom of the  
screen(like hotmail or yahoo).
I want to write a function that checkes every 10 seconds, if there are new  
messenges from an Mysql database ,
if   CurrCount < NewCount , the check will be made.
Can anyone point me in the right direction?

Thanks in advance


Re: php check function

What you're looking for will require AJAX, assuming you don't want to
refresh a page every 10 seconds to formulate a new request. You cannot
do this in php alone, as php is server side.

Re: php check function

Quoted text here. Click to load it

How can you do this with AJAX without perform a (XMLHTTP) request every
10 seconds? Btw, have you tried conditional get with XMLHTTP already? In
my experience it doesn't work well...  

Met vriendelijke groeten,
Tim Van Wassenhove <

Re: php check function

*** Tim Van Wassenhove wrote/escribió (Thu, 25 Aug 2005 23:30:01 +0000
Quoted text here. Click to load it

Performing an XMLHTTP request and reloading the page are different things.
In the first case user doesn't need to know that the page is being
reloaded: he can read contents and fill forms normally.

But of course that's JavaScript and it's offtopic ;-P (the links section has
interesting info)

Another typical option is using an iframe. I guess he's writing a chat so
it can be a solution.

-- Álvaro G. Vicario - Burgos, Spain
-- - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group

Site Timeline