What I am trying to do is get the $routedemand to be inserted into a mysql database.
The price comes from a form that is submitted and then it uses the average price to work the $routedemand out.
The averageprice comes from -
function averageprice ($price, $distance) {
$averageprice = $distance/5;
return $averageprice;
}
Lets say the $distance = 10,000;
So the $averageprice = 2,000;
If I submit a $price of 1,000, the $routedemand should come back as 100;
But it comes back as 80.
Thanks.