Transmission d'un variable en php
abdeslam1999
Messages postés
36
Statut
Membre
-
giheller Messages postés 1892 Date d'inscription Statut Membre Dernière intervention -
giheller Messages postés 1892 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai crée deux pages web en php ,dans la première page je saisie un n° dans un champ de text.
je voudrais recupérer ce n° dans la deuxième page dans un champ de text aprés d'un clique sur un submit.
voilà mon bout de code :
page1:Consultation_client.php
<?php
echo'<a href="/Gestion_Commerciale/articles/article_consulte.php?action=consultation_client&v_ref_consult
<input type="text" name="v_ref_consult" style="width:197px"/> </a>'
?>
page2:article_consulte.php
<td width="217" bgcolor="#99FFFF" align="right"><label>
<input type="text" name="refe_consult" <?php echo'value="'.$_GET['v_ref_consult'].'"'?> /></label></td>
Cordialement
J'ai crée deux pages web en php ,dans la première page je saisie un n° dans un champ de text.
je voudrais recupérer ce n° dans la deuxième page dans un champ de text aprés d'un clique sur un submit.
voilà mon bout de code :
page1:Consultation_client.php
<?php
echo'<a href="/Gestion_Commerciale/articles/article_consulte.php?action=consultation_client&v_ref_consult
<input type="text" name="v_ref_consult" style="width:197px"/> </a>'
?>
page2:article_consulte.php
<td width="217" bgcolor="#99FFFF" align="right"><label>
<input type="text" name="refe_consult" <?php echo'value="'.$_GET['v_ref_consult'].'"'?> /></label></td>
Cordialement
Configuration: Windows XP Internet Explorer 6.0 dreamweaver wamp
2 réponses
-
Bonjour
essayez tout simplment :
page2:article_consulte.php
<td width="217" bgcolor="#99FFFF" align="right"><label>
<?php echo $_GET['v_ref_consult']?> /></label></td> -
essaye plutot avec cette mlethode et un input dans un formulaire:
page1:Consultation_client.php <form name="form1" method="post" action="article_consulte.php"> <input type="text" name="v_ref_consult" value=""style="width:197px"/> <br /> <input type="submit" name="consulter" value="Consulter"> </form> page2:article_consulte.php <?php if(isset($_POST['consulter"'])){ //le bouton Consulter de type submit a été cliqué //on recupere la valeur postée $v_ref_consult=$_POST['v_ref_consult']; } ?> <td width="217" bgcolor="#99FFFF" align="right"><label> <input type="text" name="refe_consult" value="<?php echo $v_ref_consult; ?>" /></label></td>