Jump to content

Help with a simple average calculation on my handle form page


stof01

Recommended Posts

Hi

 

Got a few questions...

 

Have to create a page that takes some inputs from a user then computes the average speed.i cant seem to get this to work ,whether its my index file or handle form file? please may I email my files to someone who can look over them...

 

much appreciated

 

Chris

 

[email protected]

 

ok i got as far as to make it work but i don't know how to do it with the minutes too? i've only divided the distance by the hours

 

<?php

$hour=$_POST['hour'];

$distance=$_POST['distance'];

$average=$distance/$hour;

$average=round($average,2);

print $average;

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.