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 41 42 43 44
| <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$piece[0]["valeur"] = 2;
$piece[0]["img"] = "2euro.png";
$piece[1]["valeur"] = 1;
$piece[1]["img"] = "1euro.png";
$piece[2]["valeur"] = 0.5;
$piece[2]["img"] = "50cents.png";
$piece[3]["valeur"] = 0.2;
$piece[3]["img"] = "20cents.png";
$piece[4]["valeur"] = 0.1;
$piece[4]["img"] = "10cents.png";
$piece[5]["valeur"] = 0.05;
$piece[5]["img"] = "5cents.png";
$piece[6]["valeur"] = 0.02;
$piece[6]["img"] = "2cents.png";
$piece[7]["valeur"] = 0.01;
$piece[7]["img"] = "1cents.png";
$nbpiece = 8;
while ($nbpiece > $num){
echo '<form action="Distributeur.php" method="post" name="formulaire">
<img src="'.$piece[$num]["img"].'" tilte="euro" /><br />
<input type="number" name="piece" value="'.$piece[$num]["valeur"].'"><br />
<input type="submit" value="Passer ma commande">
</form>';
$num ++;
}
?>
</body>
</html> |
Partager