methinks you should convert the datetime to a unix timestamp with
strtotime(). then you can compare the difference between this
timestamp and a unix timestamp of "now" to find if you have logged in
within a min. of the previous time. Then, once you know what text to
display (e.g. "Less than
I'd probably out how many minutes it's been, then format it using if
statements.
$iMinues = (value from database);
if(1 > $iMinutes) $sLastseen = 'Less than a minute ago!';
elseif(1 == $iMinutes) $sLastseen = '1 minute ago';
elseif(60 > $iMinutes) $sLastseen = "{$iMinutes} minutes ago";
elseif(1
2 matches
Mail list logo