Posted by Krustov on 12/07/05 17:37
<comp.lang.php , Novice Computer User , attorneyatlaw@hotmail.com>
<1133967321.686211.81520@f14g2000cwb.googlegroups.com>
<7 Dec 2005 06:55:21 -0800>
> Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
> total novice and can't seem to figure it out. Here is a .php script.
> Right now, the
> minimum amount of time (i.e. duration) allowed is 1 month. However, I
> want to be able to reduce the minimum amount of time to 1 day (i.e.
> 24 hours) -- basically a 24 hour trial period.
>
When creating the trial .....
$days=1; $endtime = time() + $days * 24 * 3600;
When checking afterwards .....
if ( time() > $endtime) {print "trial expired <br>"; exit;}
[Back to original message]
|