this code shows the top 5 users

how do i get it to show the users that are currently online?

PHP Code:
<?php
$connect 
mysql_connect("","","") or die("Couldn't connect!");
mysql_select_db("prkscouk_users") or die("Couldn't find database");

$query mysql_query("SELECT * FROM users ORDER BY id DESC LIMIT 5");

$numrows mysql_num_rows($query);

if (
$numrows 0){
      while (
$row mysql_fetch_assoc($query))
    {
        
$id $row['id'];
        
$username $row['username'];
$email $row['email'];
        echo 
"<a href=mailto:$email>$username</a><br>";
    }
}
else
{
     echo 
"No users were found.";
}
?>