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
| <?php
$un = "100000,00";
$deux = "240";
$trois = "4,00";
$quatre = "605,98";
if(isset($_REQUEST['calculer'])){
$un = $_POSTE['id1'];
$deux = $_POSTE['id2'];
$trois = $_POSTE['id3'];
$quatre = $un + $deux + $trois;
echo $un;
echo $deux;
echo $trois;
echo $quatre;
}
?>
<form action="#" method="post" enctype="multipart/form-data">
<p> CALCULER VOTRE MENSUALITE </p>
<p>
premiere valeur : <input type="number" id="id1" value="<?php echo $un; ?>" /><br/>
deuxieme : <input type="number" id="id2" value="<?php echo $deux; ?>" /><br/>
troisieme : <input type="number" id="id3" value="<?php echo $trois;?>" />%<br/>
quatrieme : <input type="number" id="id4" value="<?php echo $quatre; ?>" /></p>
<input type="submit" value=" Calculer " name="calculer" style="cursor:pointer;"/>
</form> |
Partager