Web Hosting Talk







View Full Version : Need PHP Help (Easy - 1min)


XGenesis
10-04-2003, 11:22 PM
Hello

Im working on a script, im trying to make it when 7 days are passed over the due date the hosting account is suspended. The code which i need to edit is:


$time = time();
......
...
.....
} elseif ($myrow["paid"]=="No" && $myrow["duedate"]<$time)

How could I make it if $time equal or greater than 7 days after the Payment Due?

Could you please post the correct php coding for this example:

$myrow["duedate"]<$time - 7 days

Thankyou

luki
10-05-2003, 12:28 AM
You want this:


$time = time();
......
...
.....
} elseif ($myrow["paid"]=="No" && ($myrow["duedate"]+7*86400)<$time)

Time in an integer value in seconds; 24*60*60 = 86400 seconds in a day times 7 days...

This will trigger 7 days past due date if not paid.

XGenesis
10-05-2003, 01:09 AM
Thankyou, it worked perfectly

**My 300th Post**