| | |
|
|
|
Re: Restrict Access by Time of Day |
| message from Gary White on 15 Jul 2004 |
So we could use server time. Just create your login page as normal, then
place something like this just before the form:
<?php
$openat="08:00";
$closeat="16:30";
$current=date("H:i");
if($current<$openat | $current>$closeat)
exit("Sorry, system is not available. ".
"Hours of operation are from $openat to $closeat.");
?>
Gary
|
| Brad Lawryk replied to Gary White on 15 Jul 2004 |
Thanks Gary! You have saved the day again for me! That is exactly what I needed!
Your help once again is very very appreciated. Thanks!
Brad
|
| Gary White replied to Brad Lawryk on 15 Jul 2004 |
You're welcome, Brad. Don't forget to change the two variables to
reflect the actual opening and closing times.
$openat="08:00";
$closeat="16:30";
Gary
|
|
Archived message: Re: Restrict Access by Time of Day (Macromedia Dreamweaver)