Hi to all

I want to get the number of users logged in and display it in the header. initially I want to put a key field for the user accounts and if they logged in then calculate that key. but my question is how can I access my database let say every 2 minutes to get the number of users which already logged in. I am not sure if it is the right place I should post this question but as far as I know it is javascript or ajax related. Please give me any idea or sample on how to achieve this.

any suggestions would greatly appreciated.

thanks in advance

Tirso

Recommended Answers

All 2 Replies

This issue belongs to PHP section. Am sure you'll get all what you need from there...

all you need to do is have a row in your db called active. then you can run a query on your db with "php" it would look for all members with the value as online.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.