Ok, I got it to display now and every thing is good BUT one thing which is driving me nuts now as I have done the math and know what the correct answer is so here goes,
the code below gives a answer of when displayed:
Your total donation is:15.30249615
the code should be giving the answer of:
Your total donation is:15.549615
Whats going on here this is strage, if you take 1.29% / 100 it gives you 0.0129 which is what the computer I guess needs to be able to do the math
<?php
function Donation_Cal($donation, $donate_fee = "yes")
{
$fee = 0.0129;
$flat_fee = .30;
if ( $donate_fee == "yes" )
{
$total_donation = $donation * $fee * $fee + $flat_fee + $donation;
} // 15.549615 = 15 * .0129 * .0129 + .3 + 15
else
{
$total_donation = $donation;
}
return $total_donation;
};
echo "Your total donation is:" . Donation_Cal(15) ;
?>