note 28711 added to function.date
| From: | dave at rack1 dot php dot net | Date: | Wed, 22 Jan 2003 05:36:07 +0000 |
| Subject: | note 28711 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42552@lists.php.net to get a copy of this message | ||
On a site I was working on I needed a little checking of a expiration date to the current date. The
expiration date was being pulled from mysql (hence variable name) so it took a bit of thinking but I
came up with this
if($yyyy > $row[yyyy]){
require('private.php');
} else if($mm > $row[mm]){
require('private.php');
} else if($dd < $row[dd]){
require('private.php');
} else {
echo('You no longer have access to private things!');
}
--
http://www.php.net/manual/en/function.date.php
http://master.php.net/manage/user-notes.php?action=edit+28711
http://master.php.net/manage/user-notes.php?action=delete+28711
http://master.php.net/manage/user-notes.php?action=reject+28711