Live database requests

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chalks
Forum Contributor
Posts: 447
Joined: Thu Jul 12, 2007 7:55 am
Location: Indiana

Live database requests

Post by Chalks »

I have a website that I would like to display how many people are online and who they are. That's easy to do. It displays in a <textarea> field. However, I'd like it to update itself anytime someone else logs on, without refreshing the entire page.

Is that possible using php, or does that need to be done client-side? Regardless of which one it is, please point me towards functions that I should be using.



Incidently, this is very similar to a chat room just... without the ability to chat. :)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

You will need to make an ajax function or two. One to poll the server at regular intervals, and one to display the results, if there are any.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Post Reply