Jump to content

active users and guests


jwk811

Recommended Posts

In a regular site what you would do is generate a session for each user when the log in. Then insert that in to a table called something like active_users.

 

You would then query that table and display the information on the site somewhere.

 

When the user logs out, you have the script delete their information from the active_users table.

 

That is a very basic idea of what you have to do, but it should lead you in the right direction.

Link to comment
Share on other sites

exspire the cookie via the time function here an example from php.net ok.

 

<?php
$value = 'something from somewhere';

setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600);  /* expire in 1 hour */
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1);
?> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.