html - PMT function in PHP -


I am trying to implement the PMT function as a credit calculator in PHP.

The PHP code is not working and I'm pretty sure why, please note that I am doing the whole thing.

PHP (Get.php):

  & lt; Php $ loan = $ _POST ["loan amount"]; $ Interest = $ _POST ["interest"]; $ Months = $ _POST ["months"]; Function pmt ($ interest, $ months, $ loan) {$ months = $ months; $ Interest = $ interest / 1200; $ Amount = $ interest * - $ loan * pow ((1 + $ interest), $ month) / (1 - paw (($ 1 + $ interest), $ month); Return number-format ($ amount, 2); } "Your payment will be and pounds;" . Goal ($ amount, 2) "for one month," $ months "months"; ? & Gt;  

HTML:

  & lt; Form action = "get.php" method = "post" & gt; Loan amount: & lt; Input type = "text" min = "1" name = "loan amount" & gt; & Lt; Br / & gt; Intrest: & lt; Input type = "text" min = "1" name = "interest" & gt; & Lt; Br / & gt; Month: & lt; Input type = "text" min = "1" name = "month" & gt; & Lt; Br / & gt; & Lt; Input type = "submit" value = "submit" & gt; Monthly repayment: & lt; / Form & gt;  

Thank you in advance.

You have created the function pmt

To make it work you actually have PMT Calling the function is a need.

So something like

   

Comments