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 ?


Sorry I don’t quite understand what is your problem.

Can you get expiration information from database?

Can you calculate how long(e.g. how many days) will it expire?

Do you have problem displaying it in the web page?

Anyway, I can show you a function might be helpful:

function getDateDiff($date)

//test if $date is future


//calculate total date difference




return $diff_info;

and how to use it:

echo "You have {$diff} year(s), {$diff} month(s), {$diff} day(s) left";
echo "Your account has expired";