Hi,
Everything is working fine except the start time. Once I click start, i want to see start time is ticking but start time does not change. I want future time static and start time dynamic.
Please advise.
<html>
<?PHP
$From = date("H:i:s");
echo "From $From ";
$Minutes = 1;
echo "<br />";
$To = date("H:i:s", strtotime($From)+($Minutes*60));
?>
<SCRIPT language="JavaScript">
function newtext()
{
document.getElementById("stBtn").disabled = true;
starttime = '<?php echo $From ;?>';
futuretime = '<?php echo $To ;?>';
document.getElementById("start").innerHTML = starttime;
document.getElementById("future").innerHTML = futuretime;
setTimeout("moretext()",1 * 60000);
}
function moretext()
{
document.getElementById("subBtn").disabled = true;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM name="myform" method="post" action="sessionS1.php">
<table width='600' cellpadding='5' cellspacing='5' border='1'>
<tr> <td> <p id="start"></p> </td> <td> <p id="future"></p> </td> <td> </td> </tr>
<tr><td colspan=6 align='right'><INPUT class = "button" id="stBtn" TYPE="button" name= mytext value="StartExam" onClick="newtext
()"></td></tr>
<tr><td colspan=6 align='right'><input type='submit' id="subBtn"value='Score' name='btn_score'></td></tr>
</table>
</FORM>
</body>
</html>