Hi all,
I searched for 5 hours, trying to solve my (newbie?) problem. I want to pick
today's date and add XXX days to it. Its setup to validate membership
period. Now my column is of date type. Aswell, I want to pick current time
and add 1 hour to it. Here aswell, sessions expire after one hour.
Can anybody help me?
My code:
$time = getdate();

$yr = $time[year];
$mn = $time[mon];
$dy = $time[mday];
if (subscr_type==1) { //these users van only work 1 hour
$new_exp_day = getdate();
else if (subscr_type==3) { //3 months subscription(here time doesn't really
$offset = 90;
else if (subscr_type==12) { //1 year subscriptions

$offset = 365; 

$new_exp_day = strftime("%Y-%m-%d",mktime(0,0,0,$mn,$dy+$offset,$yr));

Frederik Feys


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to