Bonjour bon voilà je suis novice en php et j'apprend un peu à la fois
mon problème j'ai deux champs de type text et un bouton je voudrais que lorsque je clique sur le bouton cela m'affiche la valeur des champs mais dans la même page sans devoir changer de page est ce possible
voici mon code
le résultat est que cela n'affiche rien
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans titre</title> </head> <body> <form name="form" action="index.php" method="post"> Quantité : <input name='edit_qte' type='text' /></br> Prix : <input name='edit_prix' type='text' /></br></br> <input name='bouton_afficher' type='button' value='Calculer' /> <?php if (isset($_POST['bouton_afficher'])) { ?> <br /><br /> <?php echo $_POST["$edit_qte"]; echo $_POST["$edit_prix"]; } ?> </form> </body> </html>
merci
Partager