Advertisement

07.06.2007 at 07:37AM PDT, ID: 22679403
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Testing for Session Logout

Asked by moconn in PHP Scripting Language, PHP and Databases

Tags: , ,

Hi Experts,

Ok I have a problem whereby I have a large website with users logging in and out constantly.

I would like to create a function where I can tell if a user is 'Online Now'.

Currently when a user logs in the site creates a session variable $_SESSION['user_id'] and sets it to the user's ID.

I can currently tell if a single user is logged in by testing if the $_SESSION['user_id] is set or not.
This allows me to display pages, login forms etc.

However I can't tell globally who is logged in or out, my database only stores users who have logged in
but not when they have logged out as not every user will click 'Logout' on the site.

Is there any way I can pass a userID to a function which will check EVERY session and see if $_SESSION['user_id'] has been set for a particular ID?

Many thanks,
MStart Free Trial
 
Loading Advertisement...
 
[+][-]07.06.2007 at 07:48AM PDT, ID: 19432163

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2007 at 07:50AM PDT, ID: 19432183

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP Scripting Language, PHP and Databases
Tags: logout, session, when
Sign Up Now!
Solution Provided By: tolgaong
Participating Experts: 4
Solution Grade: A
 
 
[+][-]07.06.2007 at 01:42PM PDT, ID: 19434889

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.07.2007 at 09:55AM PDT, ID: 19437914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32