ok, so I changed the database column "lastaccess" to TIME. I have been playing with the actual php to try and figure out what should be done to fix this....
Heres what I have got with the results
login validation script ~action:
$process_login = "SELECT * FROM users WHERE user_name='$user_name' AND password='$password'";
$time = time();
page to display users ~ action
$time = time();
$time2 = $time - 200;
/* Performing SQL query */
$query = "SELECT DISTINCT * FROM users WHERE lastaccess > '$time2'";
$result = mysql_query($query) or die("Query failed");
while($line = mysql_fetch_array($result))
{
extract($line);
print("<li>$real_name</li>");
}
reasult~ nothing gets displayed and the database shows as 838:59:59
same thing happens when I change the time to ("H:i:s"). If I try to format it as ("HⓂs") and login as myself, the session variable user_name thinks that I am the next user record and displays me as that person and the database shows as 838:59:59. I am so damn confused over this whole thing.... :glare:
How should I be formatting the TIME()?