If you want to keep the page the same and update it with the PHP numbers, you'll need to use AJAX. The timer is fairly simple. Here's one approach:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
<script type="text/javascript">
var cnt=19;
function cntDwn(){
if(cnt>=0){
tmr=setTimeout('dispTime()',1000);
}else{
//do submit code
alert('this is it');
}
}
function dispTime(){
targ.innerHTML=cnt;
cnt--;
cntDwn();
}
window.onload=function(){
targ=document.getElementById('divOne');
cntDwn();
}
</script>
</head>
<body>
<div id="divOne" style="font:3em Verdana;width:2em;text-align:right;">20</div>
</body>
</html>