This is killing me. I've read over the Date part of the PHP Manual a thousand times and am not having much luck
I have a Members table in MySQL. One piece of information I pull is $last_activity. $last_activity contains the date/time in the format that mysql uses with the now() (i.e. 2005-04-06 09:23:10). And that's the last time the user was on the site.
Now I want to find out if this user was online in the last 10 minutes. So I'm guessing I get the date/time of now and the dat/time of 10 minutes ago and see if $last_activity is in between those two variables? Right?
So, I'm having problems figuring out how to get the variable for 10 minutes ago and even now in the correct format to compare $last_activity to. Any help is grealty appreciated!!!!
I have a Members table in MySQL. One piece of information I pull is $last_activity. $last_activity contains the date/time in the format that mysql uses with the now() (i.e. 2005-04-06 09:23:10). And that's the last time the user was on the site.
Now I want to find out if this user was online in the last 10 minutes. So I'm guessing I get the date/time of now and the dat/time of 10 minutes ago and see if $last_activity is in between those two variables? Right?
So, I'm having problems figuring out how to get the variable for 10 minutes ago and even now in the correct format to compare $last_activity to. Any help is grealty appreciated!!!!