Bonjour, je suis confronté à un problème qui me fais tourner en bourrique.
j'ai une page mofif.php qui des qu'elle est appellé en fonction d'une session, affiche des résultats issu de la bdd dans le formulaire. jusque ici tout va bien.
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 <?php include("../connection/config.php"); include("../connection/fonction.php"); include("verif.php"); //echo $_SESSION['type_user']; if($_SESSION['type_user'] == "utilisateurs") { $sql = "SELECT * FROM utilisateurs WHERE ID_USER='".$_SESSION["id"]."' "; $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); $data = mysql_fetch_object($req); ?> <p align="right"><font face="Verdana" size="1"><a href="logout.php?ID_USER=<? echo $data->ID_USER; ?>" class="">Se deconecter</a> | <a href="login.php" class="">Retour</a><br> </font></p> <p><font face="Verdana" size="2"> <?le problème viens du chanmp caché. puisque des que je le test, on dirai qu'il ne le trouve pas,
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 </font></p> <form name="form1" action="modif.php"> <p align="center"><font face="Verdana" size="2"><b>Modifié Vos Informations<br></b> <input name="action" type="hidden" id="action" value="envoi"> </font></p> <table align="center" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="983"><p align="right"><font face="Verdana" size="2">Votre Login:</font></p></td> <td width="483"> <p align="left"><font face="Verdana" size="2"> <input name="login" type="text" class="boiteform" id="login" value="<? echo $data->LOGIN_USER; ?>" size="30"> </font><font face="Verdana"><span style="font-size:6pt;"> </span><span style="font-size:7pt;">ne peux etre modifié</span></font></p></td> </tr> <tr> <td width="983"> <p align="right"><font face="Verdana" size="2">Votre email:</font></p></td> <td width="483"> <p align="left"><font face="Verdana" size="2"> <input type="text" name="email" value="<? echo $data->EMAIL_USER; ?>" size="30" class="boiteform"> </font></p></td> </tr> <tr> <td><div align="right"><font face="Verdana" size="2">Votre nom d'utilisateur: </font></div></td> <td><input name="nom" type="text" id="nom" size="30" value="<? echo $data->NOM_USER; ?>"></td> </tr> <tr> <td><div align="right"><font face="Verdana" size="2">Votre Mot de passe: </font></div></td> <td><input name="mdp" type="password" id="mdp" size="30" value="<? echo $data->MDP_USER; ?>"></td> </tr> <tr> <td><font face="Verdana" size="2"> </font></td> <td> </td> </tr> <tr> <td width="983" colspan="2"> <p align="center"><font face="Verdana" size="2"> <input type="submit" name="Submit" value="modifier"> </font></p></td> </tr> </table> </form> <?php } ?>
Le echo n'est donc pas afficher...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 if(isset($_POST["action"])) { if(isset($_POST["action"]) == "envoi") { //$email=$_POST["email"]; //$nom=$_POST["nom"]; //$mdp=$_POST["mdp"]; echo "bonjour"; } }
un truc tout simple ne fonctionne pas, alors je ne comprend plus d'ou ça viens, car sur mes autres pages ceci fonctionne très bien
Partager