Does anyone know how to do this

Discussion in 'PHP' started by oo7ml, Apr 1, 2008.

  1. #1
    <?php

    // 52 - Weekly
    // 26 - Biweekly
    // 12 - Monthly
    // 6 - Bimonthly

    $period = 12;

    function calculateMortgage($balance,$rate,$term){
    global $period;

    $N = $term * $period;
    $I = ($rate/100)/$period;
    $v = pow((1+$I),$N);
    $t = ($I*$v)/($v-1);
    $result = $balance*$t;

    return $result;
    }

    $balance = isset($_POST['balance']) ? $_POST['balance'] : '';
    $rate = isset($_POST['rate']) ? $_POST['rate'] : '';
    $term = isset($_POST['term']) ? $_POST['term'] : '';

    ?>
     
    oo7ml, Apr 1, 2008 IP
  2. DiscJockey

    DiscJockey Well-Known Member

    Messages:
    1,689
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    100
    #2
    It'll be nice if you tell us what exactly you are after ;)
     
    DiscJockey, Apr 1, 2008 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Sorry guys, i left out the most important part of the post, sorry... nothing outside the PHP tags seemed to post. Moderator can you please delete this thread, thanks and sorry again

    [Problem Solved]
     
    oo7ml, Apr 1, 2008 IP