i need to fine a php code that will tick down from lets say 20 seconds to 0 seconds then reveal a link or another php funtion
similar to this js timer here
function CreateTimer(TimerID, Time) { Timer = document.getElementById(TimerID); TotalSeconds = Time;UpdateTimer() window.setTimeout("Tick()", 1000);
}
function Tick() {
if (TotalSeconds <= 0) {
document.write(<?php
$customField = get_post_custom_values(“file_attachment”);
if (isset($customField[0])) {
echo ‘Download Now!
’;
} ?>)
return;
}TotalSeconds -= 1; UpdateTimer() window.setTimeout("Tick()", 1000);
}
function UpdateTimer() {
Timer.innerHTML = TotalSeconds;
}