For Ex:
There are 10 peoples who logged into the site. I need to track the name of the people who logged in at a admin side. Under what logic we can track the people. I prefer to do it on php. Please help me the logic of tracking.

You can use sessions and/or cookies to accomplish this. E.g:
1. When each user logs in, start a session containing their username.
2. Simply check the content of the session variables to determine who is logged in
3. Close their session when the user has logged out.

There is tons of info on this. I can help, but I'm not prepared to the write the code for you.

Basically what nonshatter said.

You'd need to create a database to store the sessions, users and last time that session was used.

If they're still logged in, and have used the site in the past XX minutes--you know they're probably logged in--you can do a simple SQL query to get their information.

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.