For some reason I seem to be having trouble getting the right method to use for my problem...basically, I want to use an expiration date. For example, when a user tries to perform a button click, the system checks the date/time, and if its past a certain date/time, not allow it to continue, accurate to the second.
So I have a web page that allows for a login...if they attempt to login after Oct. 8 2006 1:00pm EST, then it won't let them....
Should be simple, but I can't seem to get it.
Any help is greatly appreciated....
Simple Date Expiration
Moderator: General Moderators
Code: Select all
<?php
$ts = strtotime('Oct. 8 2006 1:00pm EST');
if (time() > $ts) {
die ('login not allowed after '. date('d.m.Y H:i:s', $ts));
}
?>volka wrote:see http://de2.php.net/strtotimeCode: Select all
<?php $ts = strtotime('Oct. 8 2006 1:00pm EST'); if (time() > $ts) { die ('login not allowed after '. date('d.m.Y H:i:s', $ts)); } ?>
I like that!
hanji