here the concerning code
$conv1 = strtotime($takeofftime);
$conv2 = strtotime($landingtime);
$timespan = ($conv2 - $conv1) / 60;
the problem being if $conv1 is set to before midnight in the form and $conv2 is set after mindight it calculates it as if its going back in time not forwards into the next day any ideas?
for example if a user enters
$conv1 as 23:00 hours
and
$conv2 as 01:00 hours
it wont work it out proply heres the output from the php file behind the form:
You Just Entered This Information
Pilot ID : V-RAF 1
Name : Daniel Hill
Takeoff Time : 23:00
Landing Time : 01:00
Your Total Flight Time : -1320 <-- theres the prob it should read 120 as in 120 minutes/2 hours not -1320 minutes as in 22 hours
Departure Airport : egnt
Arrival Airport : egkk
Aircraft : 737
Notes : None
any idea's?