|
Advice with XMLHTTPRequest
I have a complex issue I am having trouble resolving. Basically I am trying to create a live user queue with some combination of ajax and php. When someone enters the queue I insert their ID into the database. Now, here is my problem. Disclaimer: I'm not an expert programmer.
I have page 1 with a setinterval command that is running an xmlhttprequest to page 2. Page 2 (completely php) is basically just counting the rows in the database to see how many users are in the queue and reporting back a live update of how many users are there. I am trying to figure out how to do a redirect of Page 1 whenever Page 2 has found 5 users in the queue. Is there any way to pass a variable back to page 1 or something? Or do I need to code some javascript accessing the database instead of php?
|