Bonjour tout le monde,
Dans mon fichier PHP, j’ai stocké une valeur « 400 » dans une variable PHP.
Le problème c’est que je n’arrive pas à afficher ma variable.
Voici un extrait du code :
$prix="400";
echo '<td align="right"><input type="text" name="qte_122" value=$prix; size="4" /> €</td>';
Le code complet :
-
- <?php
-
-
- $prix="400";
- echo $prix;
-
-
-
- echo '<table border="0" cellspacing="0" cellpadding="0" width="80%" align="center">';
- echo '<tr>';
- echo '<td align="left"><b>Référence</b></td>';
- echo '<td align="right"><b>P.U. (HT) </b></td>';
- echo '<td align="middle"><b>Panier</b></td>';
- echo '</tr>';
- echo '<tr>';
-
-
-
-
-
- echo '<tr>';
- echo '<td align="left">Reference3</td>';
-
- echo '<td align="right"><input type="text" name="qte_122" value=$prix; size="4" /> €</td>';
-
- echo '<td align="middle"><input type="text" name="qte_122" value="1" size="4" />
- <a href="#" onclick="document.location.href=\'ajout_panier.php?numserie=Refer&qte=\'+document.form1.qte_122.value+\'&prix=326.00&origine=liste_article.php?\'">Ajout Panier</a>';
-
- echo '</td>';
- echo '</tr>';
-
-
- ?>
-
echo '<td align="right"><input type="text" name="qte_122" value="'.$prix.'" size="4" /> €</td>';
Résolu