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 33 34 35 36 37 38 39 40
| </head>
<body>
<h1> TD2 Exercice 3 </h1>
<form name="input" method="get">
Montant du Capital:
<input type="text" name="capital" size="10">
<br>
Taux d'interet annuel:
<input type="text" name="taux" size="2">
<br>
Duree en annees:
<input type="text" name="duree" size="10">
<br>
Avec assurance:
<input type="checkbox" name="assurance" value="yes">
<br>
<input type="submit" value="Submit">
</form>
<br>
<?php
// on essaiye le fonction
$length = sizeof($_GET);
//echo "$length<br>";
if ($length > 0){
$c = $_GET[capital];
$t = $_GET[taux];
$n = $_GET[duree];
$a = $_GET[assurance];
echo "<br>";
//echo "$c , $t , $n , $a ";
$m = yearly($c,$t,$n,$a);
$rm = round($m,2);
echo "la mensualité: $rm";
}
echo "</br>";
?>
</body>
</html> |
Partager