-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.php
More file actions
32 lines (28 loc) · 814 Bytes
/
main.php
File metadata and controls
32 lines (28 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*
* Mortage Calculator Code
*/
$principleAmount = $_POST['principleAmount'];
$interestRate = $_POST['interestRate'];
$interestRate = $interestRate / 100;
$years = $_POST['years'];
$months = $years * 12;
$monthlyPayments = (($interestRate * pow((1 + $interestRate),$months)) / (pow((1 + $interestRate),$months)-1));
$monthlyPayments *= $principleAmount;
if(isset($_POST['principleAmount'])){
echo "$monthlyPayments";
}
?>
<?php
/*
* Investment Tab Code
*
$address = $_POST['address'];
$sqrFt = $_POST['squareFeet'];
$price = $_POST['price'];
$priceSqrFt = 0.0;
$closingCost = 0.0;
$agent = 0.0;
$repairs = 0.0;
*/
?>