View Single Post
  #6 (permalink)  
Old November 3rd, 2003, 07:43 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The skinny of it is I think you want to be subtracting, not adding the $Monthly variable.

$_POST["loan"] = $_POST["loan"] - $Monthly;

Perhaps for clarity this would be easier:

$Principle = $_POST["loan"];

First you calculate accrued interest on the $Principle, then you would be subtracting your $Monthly payment from the $Principle to get the $Duration.

Make sense?
: )
Rich


:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
Reply With Quote