EDIT
I am making a modified compound interest calculator.
Here is my problem:
Say you put $100 (amount) a month in to a 8% (rate) interest rate a year account.
You add this $100 a month for 30 years (years). With the interest compounding every year. How much would you have at the end of the 30 years.
here it is on my server: www.gotomountainview.com/input.php
What is going wrong? The $count is not adding up right somewhere.
<?php
$amount = $POST['amount'];
$years = $POST['years'];
$rate = $_POST['rate'];
?>
<?php
for ($year = 1; $year < $years; $year++)
{
$count = 0 + $count;
$subtotal = 12 ($amount + $count);
$final = $subtotal $rate;
$count = $subtotal + $final;
}
print "$count"
?>