Bonjour,
J'essaie d'utiliser la fonction jvs «hidden» pour passer une variable par champ caché entre deux routines php. Voici la routine d'envoi :
Voici la routine de récupération :
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 <html> <head> <title>Envoi_variable</title> </head> <? $variable='moi'; ?> <body> <form name="blabla" action="Recup_variable.php" method="post"> <input type="hidden" id="liste" value="<? echo $variable;?>" /> </form> </body> </html> <table><tr><td> <a href= "Recup_variable.php" onClick="document.getElementById('blabla').submit()" style="text-decoration:none"> Envoyer variable </td></tr></table>
Oui, vous vous en doutez bien, j'ai un problème, ça ne fonctionne pas ! J'oublie quelque chose... mais quoi ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <html> <head> <title>Recup_variable.php</title> </head> <? $variable =$_POST['liste']; echo $variable; exit; ?>
Vous avez une suggestion ?
Merc
Partager