I want to get the difference between $_POST time and the time generated within the page after submit.
As I want to do an if statement which would be if the difference between the two times is less than 5seconds then ... else ...
Is using php date("H:i:s); the correct function?
Generate time
<?php date = date("H:i:s"); ?>
Echo time in hidden form field
<input name="tstmp" type="hidden" value="<?php echo $date; ?>"/>
Then in the page that the user get's directed to after form submit.
//could the problem be this is a string within the $_POST
$timestart = $_POST['tstmp'];
$timeend = date("H:i:s");
//can this only be used with timestamp?
$interval = $timestart->diff($timeend);