You could include a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).ecords the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already loggn the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '".$_POST['username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) &amto update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User &e load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).ry) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).ere's not a way to tell what the user is actually doing (client side).on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is an every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '"e;.time()-3he time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server siable WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).ur database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actualamp;quote;.$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).utes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already logge like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).y was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it s' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side). records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not re 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).at records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;tivity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POST['username']." is already logged into the system.");
}
T5 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is stactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, d FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell whaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side). database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).uote;.$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already logged into the system.");
}
a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side,. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '"e;.time()-300."e;'"e;);
// tser was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already logged into the system."e;);
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side)f they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}[/php:1:'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not d.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHPnum_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).e if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).a field in your database that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '"e;.time()-300.& that records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User "e;.$_POSTї'username']."e; is already logged into the system."e;);
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side). timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) &gn determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already logged into the sysoad, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side). records the time a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}[mine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already lte. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).p;quote;' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).E username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'"e;);
// this example is y to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and thereif they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).haps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the onle load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)st active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '"e;.time()-300."etime a user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("e;SELECT id FROM table WHERE username = '"e;.$_POSTї'username']."e;' AND timelastactive >= '"e;.time()-300."e;'"e;);
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'usrhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User ".$_POST['username']." is already logged i are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about e;.$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("e;User "e;.$_POSTї'username']."e; is already logged into the system."e;);
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).st active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}[/php:1:ba7f00user was last active on the site. Perhaps on every page load, run a query to update this field.
Then determine if they are 'logged on' as say.. 15 minutes of time with no activity?
When you go to log on, query the database like
Code: Select all
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).
$query = mysql_query("SELECT id FROM table WHERE username = '".$_POST['username']."' AND timelastactive >= '".time()-300."'");
// this example is 5 minutes
// Check to see if the query was met
if(mysql_num_rows($query) > 0)
{
die("User ".$_POST['username']." is already logged into the system.");
}
This is about the only way to do it since PHP is server side, and there's not a way to tell what the user is actually doing (client side).