Bonjour tout le monde!
J'ai un petit problème avec mon formulaire. voici le code de ma page :
le traitement de cette page se fait sur une autre page :
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199 <? session_start(); include("database.php"); import_request_variables("P","form1_"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a href="http://www.w3.org/TR/html4/loose.dtd" target="_blank">http://www.w3.org/TR/html4/loose.dtd</a>"> <html> <head> <script language="javascript"> function afficher1() { document.getElementById("PAY").style.visibility='visible'; } function cacher2() { document.getElementById("PAY").style.visibility='hidden'; } function cacher3() { document.getElementById("dipl").style.visibility='hidden'; } function afficher3() { document.getElementById("dipl").style.visibility='visible'; } </script> <title>Informations Personnelles</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 {font-size: xx-large} body { background-image: url(images/fond_index.jpg); background-repeat: no-repeat; background-attachment: fixed; background-position: center top; display: list-item; } --> </style> <link href="background%20style.css" rel="stylesheet" type="text/css"> </head> <body > <h1 align="center"> </h1> <h1 align="center"><strong><span class="style1">INFORMATIONS PERSONNELLES</span></strong></h1> <p align="center"> </p> <form action="traitement1.php" method="post" name="form1"> <div align="center"> <table width="504" border="0" align="center"> <tr bordercolor="" bgcolor=""> <td align="left" ><strong>Civilité : </strong></td> <td width="306" align="left" background="Drag to a file to choose it."><select name="CIV" id="CIV"> <option value="1">Mlle</option> <option value="2">Mme</option> <option value="3">Mr</option> <option value="0">civilité</option> </select></td> </tr> <tr bordercolor="" bgcolor=""> <td align="left" background="Drag to a file to choose it."><strong>Nom : </strong></td> <td align="left" background="Drag to a file to choose it."> <input name="nom" type="text" id="nom"></td> </tr> <tr bordercolor="" bgcolor=""> <td align="left" background="Drag to a file to choose it."><strong>Prénom :</strong></td> <td align="left" background="Drag to a file to choose it."><input name="prenom" type="text" id="prenom"></td> </tr> <tr bordercolor="" bgcolor=""> <td align="left" background="Drag to a file to choose it."><strong>Date de naissance : </strong></td> <td align="left" background="Drag to a file to choose it."><input name="date" type="text" id="date"></td> </tr> <tr bordercolor="" bgcolor=""> <td align="left" background="Drag to a file to choose it."><strong>Email : </strong></td> <td align="left" background="Drag to a file to choose it."><input name="email" type="text" id="email" size="50"></td> </tr> <tr bordercolor="" bgcolor=""> <td align="left" background="Drag to a file to choose it." bgcolor=""><strong>Promotion ESSTIN : </strong></td> <td align="left" background="Drag to a file to choose it."><select name="PRO" id="PRO"> <option selected>Promotion</option> <option value="1">1965</option> <option value="2">1966</option> </select></td> </tr> </table> <p> </p> <table width="506" border="0" align="center" id="t2"> <tr align="left" bordercolor=""> <td colspan="2" background="Drag to a file to choose it."><strong>Quand as-tu intégré l'ESSTIN ? </strong></td> </tr> <tr align="left" bordercolor=""> <td colspan="2" background="Drag to a file to choose it."><p> <label> <input type="radio" name="ENT" value="1"> 1A</label> <br> <label> <input type="radio" name="ENT" value="3"> 3A </label> <br> <label> <input type="radio" name="ENT" value="4"> 4A</label> <br> </p></td> </tr> <tr align="left" bordercolor=""> <td colspan="2" background="Drag to a file to choose it."><strong>As-tu passé un séjour à l'étranger ? </strong></td> </tr> <tr align="left" bordercolor=""> <td width="65" height="26" bordercolor="#000000" background="Drag to a file to choose it."> <div align="left"> <p> <label> <input type="radio" name="ON1" value="1" onClick="afficher1()"> Oui</label> <br> <label> <input type="radio" name="ON1" value="0" onClick="cacher2()"> Non</label> <br> </p> </div></td> <td width="385" bordercolor="#000000" background="Drag to a file to choose it."><font size="-1"> <select name="PAY" id="PAY" style="visibility:hidden" > <option value="" selected> Tous les pays</option> <option value="countryAR"> Argentina</option> <option value="countryAM"> Armenia</option> </select> </font></td> </tr> </table> <table width="506" height="118" border="0" align="center"> <tr> <td height="21" colspan="2" align="left"><p><strong>Quelle option de fin d'étude avais-tu suivi ? </strong></p></td> </tr> <tr> <td height="26" colspan="2" align="left"><p id="OPT" name="OPT" size="1"> <select name="OPT" size="1" id="OPT"> <option value="1">IE</option> <option value="2">MS</option> <option value="3">MFE</option> <option value="4">TM</option> <option value="5">AUTO</option> <option value="6">MAINTENANCE</option> <option value="7">IRS</option> <option selected>Option</option> </select> </p></td> </tr> <tr> <td height="21" colspan="2" align="left"><p align="left"><strong>As-tu d'autres diplômes ? </strong></p></td> </tr> <tr> <td width="66" height="40" align="left"><div align="left"> <p> <label> <input type="radio" name="DIP" value="1" onClick="afficher3()"> Oui</label> <br> <label> <input type="radio" name="DIP" value="0" onClick="cacher3()"> Non</label> </p> </div> </td> <td width="430" height="40" align="left"><textarea name="dipl" id="dipl" style="visibility:hidden"></textarea></td> </tr> </table> </div> <p align="center"> <input name="ps1" type="submit" class="Bouttons" id="ps1" value="Page suivante" > </p> </form> <? echo"<a href=\"logout.php\">Logout</a>"; if (isset($_POST['CIV']) && isset($_POST['nom']) && isset($_POST['prenom']) && isset($_POST['date']) && isset($_POST['email']) && isset($_POST['PRO']) && isset($_POST['ENT']) && isset($_POST['ON1']) && isset($_POST['PAY']) && isset($_POST['OPT']) && isset($_POST['DIP']) && isset($_POST['dipl'])) { $_SESSION['CIV'] = $_POST["CIV"]; $_SESSION['nom'] = $_POST["nom"]; $_SESSION['prenom'] = $_POST["prenom"]; $_SESSION['date'] = $_POST["date"]; $_SESSION['email'] = $_POST["email"]; $_SESSION['PRO'] = $_POST["PRO"]; $_SESSION['ENT'] = $_POST["ENT"]; $_SESSION['ON1'] = $_POST["ON1"]; $_SESSION['PAY'] = $_POST["PAY"]; $_SESSION['OPT'] = $_POST["OPT"]; $_SESSION['DIP'] = $_POST["DIP"]; $_SESSION['dipl'] = $_POST["dipl"]; } else { var_dump($_POST); die('Erreur à la soumission du formulaire'); } ?> </body></html>
sur la page Form1.php j'ai une erreur du type : erreur de soumission du formulaire...
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 <? /* Include Files *********************/ session_start(); include("database.php"); /*************************************/ ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a href="http://www.w3.org/TR/html4/loose.dtd" target="_blank">http://www.w3.org/TR/html4/loose.dtd</a>"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <? function transfer1(){ global $conn; echo $q = "UPDATE 'utilisateur' SET civ='".$_SESSION['CIV']."', nom='".$_SESSION['nom']."', prenom='".$_SESSION['prenom']."', date='".$_SESSION['date']."', email='".$_SESSION['email']."', pro = '".$_SESSION['PRO']."', ent= '".$_SESSION['ENT']."', on1 = '".$_SESSION['ON1']."', pay = '".$_SESSION['PAY']."', opt = '".$_SESSION['OPT']."', dip= '".$_SESSION['DIP']."', dipl = '".$_SESSION['dipl']."' WHERE user='yassinej' "; return mysql_query($q,$conn); } transfer1(); ?> <p align="center"><strong>TRAITEMENT DES DONNEES EN COURS....</strong></p> </body> </html>
je ne sais pas ce qui cloche..?
merci
Partager