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.

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);
?> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.