Store the timestamp of their first login to a database. Also store the number of days (3, 90, 365) that there account is valid. Setup a script to nightly go through the database and for any records where:
first_login_timstamp + number_of_days < right_now is true invalidate their login and send notifications. Pretty easy to do with the date/time functions in any database. Of if you can't use a database like that, store it all as numbers (timestamps - number of seconds since 1970...) and just do the math with 86400 seconds equalling one day. good luck! On Wed, 19 Feb 2003, Pushpinder Singh Garcha wrote: > Hello Everyone, > > My php/mysql application needs to keep track of the first time that a > User logs on to the site. Afterwards the User should be allowed either > 3 days / 3 months/1 year of access to the site. Once the stipulated > time period is over the system should invalidate the login of the user. > The Admin/ User should get email notification about this. The > notification part is easy the hard part to figure out is how to be able > to keep and tab on the Time Period stipulated for a user. > > Thanks in advance > Pushpinder Singh Garcha > _________________________________ > Web Architect > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php