File size: 1.57Kb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
POGLEJ.NET script
Author: Lukaslo
Email: scripts@poglej.net
Copyright 2006 scripts on poglej.net
Please send us a mail with your opinion
send your opinions on scripts@poglej.net
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Caculate your profit</title>
<style type="text/css">
<!--
.style1 {
font-size: 12px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body marginheight="0">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><?
if (isset($_POST['years']))
{
$money=$_POST['money'];
$years=$_POST['years'];
$percent=$_POST['percent'];
$percent100="1.".$percent;
$result= pow($percent100, $years);
$result *= $money;
$result = round($result, 2);
echo "If you had invested $money for $years years with $percent % profit per year, you would have $result <hr>";
}
?>
Calculate your profit:
<form name="form1" method="post" action="<? echo $_POST['self']; ?>">
<span class="style1">Profit per year %:
<input name="percent" type="text" value="20" size="4" maxlength="2">
%<br>
Money invested .:
<input name="money" type="text" value="1000" size="8" maxlength="6">
$<br>
How many years:
<input name="years" type="text" value="5" size="3" maxlength="2">
Years <br>
<input type="submit" name="Submit" value="Calculate">
</span>
</form></td>
</tr>
</table>
</body>
</html>