$ TIME = getdate ();
$ TT = $ TIME [Year] * 365 * 24 * 60 $ TIME [MON] * 30 * 24 * 60 $ TIME [MDAY] * 24 * 60 $ TIME [Hours] * 60 $ TIME [minutes] ;
IF ($ UserID! = "Guest") {
$ SQLQQ = "Update $ user_attr_table set time = $ tt, status = 1 where userid = '$ userid'";
MySQL_QUERY ($ SQLQQ);
$ SQLQ = "SELECT STATUS, UserId, Time from $ User_attr_table where status = 1;"
$ resultq = mysql_query ($ sqlq) or Die (MySQL_ERROR ());
$ countq = mysql_numrows ($ resultQ);
For ($ II = 0; $ II <$ COUNTQ; $ II ) {
$ rowq = mysql_fetch_Array ($ results);
$ useridq = $ rowq [userid];
$ TIMES = $ ROWQ [TIME];
$ TS = $ TT- $ TIMES;
IF ($ TS> = 15)
{
$ SQLS = "Update $ user_attr_table set status = 0 where userid = '$ useridq'"
MySQL_Query ($ SQLS);
}
}
?>
I wrote the code down, and I will see your own :)
If you don't understand, you can ask questions.
I am often here :)