Hi folks,
Just a small problem, i am trying to get the last logged in user but its just quite not working right.
if ($scount == 'last') {
// less 30secs so it doesnt grab the user logging in
$ndate = date('Y-m-d H:i:s', time() - 30);
$query = $db->query("SELECT username FROM login WHERE last < '$ndate'");
$row = $db->fetch_array($query);
echo $row['username'];
}
This is always grabbing the first user in the table and am puzzled a bit how to achieve this.
thanks.