<input type = "text" name = "time1" value = "<?php echo $row['Hours']; ?>">
<input type = "text" name = "time2">
<input type = "submit"name = "Compute" value = "Compute" >
$calc="";
if(isset($_POST["Compute"]))
{
$time1=$_POST['time1'];
$time2=$_POST['time2'];
$calc = ($time1=$_POST['time1']-$time2=$_POST['time2']);
我想计算两次之间经过的小时数。例如,我在文本框1上午9:30输入,然后在textbox2中输入,我在下午5:00输入