Basically, I want php to display "Online" if the user's last login time ($row['last_login']) was less than 10 minutes ago ($time_ofusers, which is set in another file (config.inc.php)) but if the time was more than 10 minutes ago, the user is shown as "Offline".
I know that my code is waay wrong.
if (date('F j, Y, g:i a',strtotime($str2) >= date_sub(now(),interval $time_ofusers minute)) {
echo "Status: Online
}
else {
echo "Status: Offline";
}
I tried googling it and looking on php.net but I don't really know what I'm looking for..
Thanks in advance for any help.