rondog Posted September 14, 2009 Share Posted September 14, 2009 I need to achieve limiting a user to login once per week. The week starts on Mondays. So if the user logs in on thursday, they cannot login until the following monday. If they login monday then cannot login until the next monday. How can I achieve this? Link to comment https://forums.phpfreaks.com/topic/174220-login-once-per-week/ Share on other sites More sharing options...
deansatch Posted September 14, 2009 Share Posted September 14, 2009 Create "last_logged_in" column. Upon successfully logging in, update that users row with the time(). During logging in check the last_logged_in value against the current time() Link to comment https://forums.phpfreaks.com/topic/174220-login-once-per-week/#findComment-918451 Share on other sites More sharing options...
rondog Posted September 14, 2009 Author Share Posted September 14, 2009 How could I do it using PHP to determine the time? Link to comment https://forums.phpfreaks.com/topic/174220-login-once-per-week/#findComment-918516 Share on other sites More sharing options...
deansatch Posted September 16, 2009 Share Posted September 16, 2009 <?php $time = time(); ?> Link to comment https://forums.phpfreaks.com/topic/174220-login-once-per-week/#findComment-919573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.