Understanding financial formulae in ASP Classic

pomamo

New Member
I wish to make a PHP based financial calculator, I got ASP source code from my friend, but I don't understand the coding very well, can someone help me translate it to PHP?I just need to understand the formulae inside the ASP.Thanks!Code:\[code\]def_pv_calc01 = trim(request.form("pv_calc01"))def_pmt_calc01 = trim(request.form("pmt_calc01"))def_mip_calc01 = trim(request.form("mip_calc01"))def_r_calc01 = trim(request.form("r_calc01"))def_ihp_calc01 =trim(request.form("ihp_calc01")) dim E6_calc01 : E6_calc01 = request.form("pmt_calc01")dim E9_calc01 : E9_calc01 = request.form("r_calc01") / 100dim E16_calc01 : E16_calc01 = E9_calc01/12+1dim E13_calc01 : E13_calc01 = request.form("mip_calc01") * 12dim E14_calc01 : E14_calc01 = request.form("ihp_calc01") *12 - E13_calc01dim E5_calc01 : E5_calc01 = request.form("pv_calc01")dim E15_calc01 : E15_calc01 = E13_calc01 + E14_calc01dim something_calc01 : something_calc01 = E6_calc01*E16_calc01^0*(1-(E16_calc01^E13_calc01))/(1-E16_calc01)+E5_calc01*E16_calc01^E13_calc01dim result_calc01 : result_calc01 = E6_calc01*E16_calc01^E14_calc01*(1-(E16_calc01^E13_calc01))/(1-E16_calc01)+E5_calc01*E16_calc01^E15_calc01result_calc01 = formatNumber(result_calc01,2)If Err.Number <> 0 Then result_calc01 = "Error On Inputs"\[/code\]A RAR file with the entire code can be found here. The code with these formulae is in the file name called "financial_calculator.asp"
 
Back
Top