Restricting a login based on timestamps
Posted: Sun Feb 24, 2008 2:13 pm
Hi guys
Can anyone point me in the direction of a tutorial or some such material on using a timestamp against a user login
Basically I have a registration script which picks up the date a user registers. I want to take that info and allow access for a set time before they have to pay to use the site say 14 days now im sure I can fix it to just take the date and add say 14 days to it before denying access but is it as simple as writing if statements to get the code to recognise when the month changes, or is it better to do this in the SQL ?
Thanks in advance
Can anyone point me in the direction of a tutorial or some such material on using a timestamp against a user login
Basically I have a registration script which picks up the date a user registers. I want to take that info and allow access for a set time before they have to pay to use the site say 14 days now im sure I can fix it to just take the date and add say 14 days to it before denying access but is it as simple as writing if statements to get the code to recognise when the month changes, or is it better to do this in the SQL ?
Thanks in advance