The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Countdown with php ? Re: Countdown with php ?


I agree with @TheDoc, at least you have to get user data from database(including when will the account expire).

Assuming you have got it and put it into a PHP variable “$expiration” and the format is UNIX timestamp.

So next you can use $expiration to calculate useful infomation:

1. Get the expiration date:

echo "Your account will be expired on ".date('m/d/Y',$expiration);

The output will be something like:
Your account will be expired on 06/01/2012

Read PHP manual to get more information on date:

2. Get datetime differenc

...//continue with your countdown script...