Bonjour

je vient d'installez sur mon forum un formulaire qui permet de postez directement ,dans un Topic prévu à cette éffet .

Voici le code du formulaire :
Le fichier recrutement.php

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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?php 
define('IN_PHPBB', true); 
 
$phpbb_root_path = './'; // <-- 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 
 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 
?>
<style type="text/css">
<!--
.style3 {color: #FF0000}
.style4 {color: #00FFFF}
-->
</style>
 <title>Formulaire de Recrutement</title><table width="100%" border="0" align="center" cellpadding="0" 
cellspacing="0"> 
<tr> 
 
<form name="application" method="post" action= 
"insert_post.php" id="application"> 
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr> 
<th><span class="genmed">Nom Joueur(pseudo) :<br /> 
</span></td> 
<th><span class="genmed">Age:<br /> 
</span></td> 
<th><span class="genmed">Classe:<br /> 
</span></td> 
<th><span class="genmed">Heure :<br /> 
</span></td> 
<th><span class="genmed">Votre vrai Nom : <br /> 
</span></td> 
</tr> 
<tr> 
<td class="row2"><input name="charname" type="text" class="post" id="charname" size="15" /></td> 
 
<td class="row2"><input name="playerage" type="text" class="post" size="2" maxlength="2" /></td> 
<td class="row2"><select name="charclass" id="charclass"> 
  <option value="Druid">Druid</option> 
  <option value="Hunter">Hunter</option> 
  <option value="Mage">Mage</option> 
  <option value="Paladin">Paladin</option> 
  <option value="Priest">Priest</option> 
  <option value="Rogue">Rogue</option> 
  <option value="Shaman">Shaman</option> 
  <option value="Warlock" selected="selected">Warlock</option> 
  <option value="Warrior">Warrior</option> 
</select></td> 
<td class="row2"><select name="location" id="location">
  <option value="GMT-12">(GMT -12:00) Eniwetok, Kwajalein</option>
  <option value="GMT-11">(GMT -11:00) Midway Island, Samoa</option>
  <option value="GMT-10">(GMT -10:00) Hawaii</option>
  <option value="GMT-9">(GMT -9:00) Alaska</option>
  <option value="GMT-8">(GMT -8:00) Pacific Time (US &amp; Canada)</option>
  <option value="GMT-7">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
  <option value="GMT-6">(GMT -6:00) Central Time (US &amp; Canada), Mexico City</option>
  <option value="GMT-5">(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima</option>
  <option value="GMT-4">(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz</option>
  <option value="GMT-3.5">(GMT -3:30) Newfoundland</option>
  <option value="GMT-3">(GMT -3:00) Brazil, Buenos Aires, Georgetown</option>
  <option value="GMT-2">(GMT -2:00) Mid-Atlantic</option>
  <option value="GMT-1">(GMT -1:00 hour) Azores, Cape Verde Islands</option>
  <option value="GMT">(GMT) Western Europe Time, London, Lisbon, Casablanca</option>
  <option value="GMT+1" selected="selected">(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris</option>
  <option value="GMT+2">(GMT +2:00) Kaliningrad, South Africa</option>
  <option value="GMT+3">(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg</option>
  <option value="GMT+3.5">(GMT +3:30) Tehran</option>
  <option value="GMT+4">(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi</option>
  <option value="GMT+4.5">(GMT +4:30) Kabul</option>
  <option value="GMT+5">(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
  <option value="GMT+5.5">(GMT +5:30) Bombay, Calcutta, Madras, New Delhi</option>
  <option value="GMT+6">(GMT +6:00) Almaty, Dhaka, Colombo</option>
  <option value="GMT+7">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
  <option value="GMT+8">(GMT +8:00) Beijing, Perth, Singapore, Hong Kong</option>
  <option value="GMT+9">(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk</option>
  <option value="GMT+9.5">(GMT +9:30) Adelaide, Darwin</option>
  <option value="GMT+10">(GMT +10:00) Eastern Australia, Guam, Vladivostok</option>
  <option value="GMT+11">(GMT +11:00) Magadan, Solomon Islands, New Caledonia</option>
  <option value="GMT+12">(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka</option>
</select></td> 
<td class="row2"><input name="realname" type="text" class="post" id="realname" size= 
"30" /></td> 
</tr> 
</table> 
<br /> 
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr> 
 
<th nowrap="nowrap"><span class="genmed">Vos jours de jeu <span class="gensmall"></span></th> 
<th>Level:</th> 
<th><span class="genmed">Le Temps de jeu ? </span></th> 
</tr> 
<tr class="row1"> 
<td nowrap="nowrap"><input name="day7" type="checkbox" id="day7" value="Yes, " />
Dim <input name="day1" 
type="checkbox" id="day1" value="Yes, " />
Lundi
&nbsp; <input name="day2" type="checkbox" id="day2" value="Yes, " />
Mardi&nbsp; 
<input name="day3" type="checkbox" id="day3" value="Yes, " />
Merci <input name="day4" type="checkbox" id="day4" value="Yes, " />
Jeudi&nbsp; <input name="day5" type="checkbox" id="day5" value="Yes, " />
Vendredi <input name="day6" type="checkbox" id="day6" value="Yes," />
Samedi</td> 
 
<td class="row2"><input name="charlevel" type="text" class="post" id="charlevel" size="2" maxlength="2" /></td> 
<td class="row2"><select name="tolorance" id="tolorance">
  <option>4 soir par semaine</option>
  <option>3soir par semaine</option>
  <option>2Soir par semaine</option>
  <option>1Soir par semaine</option>
</select></td> 
</tr> 
</table> 
<br /> 
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr> 
<th><span class="genmed">Reputation </span> en mode h&eacute;ro
 
<th valign="top"><span class="genmed">Vos acc&eacute;s en Instance :</span></th> 
<th valign="top"><span class="genmed">Vos Metiers :</span></th> 
</tr> 
<tr> 
<td class="row2"><input name="thrallrep" type="checkbox" id="thrallrep" value= 
"Yes, " /> 
  Bastion Honneur <br /> 
  <input name="cenrep" type="checkbox" id="cenrep" value= 
"Yes, " /> 
  Cenarion Expedition&nbsp;<br /> 
  <input name="lowerrep" type="checkbox" id="lowerrep" value= 
"Yes, " /> 
  Ville basse &nbsp;<br /> 
  <input name="sharep" type="checkbox" id="sharep" value= 
"Yes, " /> 
  The Sha'tar&nbsp;<br /> 
  <input name="keeprep" type="checkbox" id="keeprep" value= 
"Yes," /> 
  Gardiens Du Temps <br /></td> 
<td class="row2"><input name="karatune" type="checkbox" id="karatune" value= 
"Yes, " /> 
  Karazhan&nbsp;<br /> 
  <input name="temptune" type="checkbox" id="temptune" value= 
"Yes, " />
  Le Temple Noir   &nbsp;<br /> 
  <input name="serptune" type="checkbox" id="serptune" value= 
"Yes, " /> 
  SSC<br /> 
  <input name="onytune" type="checkbox" id="onytune" value= 
"Yes," /> 
  Mt. Hyjal</td> 
<td class="row2"><select name="prof1" id="prof1">
  <option>Metier principale</option>
  <option>Herboriste</option>
  <option>Mineur</option> 
  <option>Alchemy</option> 
  <option>Alchemy/ Master of Potions</option> 
  <option>Alchemy/ Master of Elixirs</option>
  <option>Alchemy/ Transmutation</option>
  <option>Cuisine</option>
  <option>Forgeron</option>
  <option>Enchanteur</option>
  <option>Tribal</option>
  <option>Ing&eacute;nieur</option>
  <option>Joalier</option> 
</select> 
  <br /> 
  <br />
  <select name="prof2" id="prof2">
    <option>Metier second</option>
    <option>Herboriste</option>
    <option>Mineur</option>
    <option>Alchemy</option>
    <option>Alchemy/ Master of Potions</option>
    <option>Alchemy/ Master of Elixirs</option>
    <option>Alchemy/ Transmutation</option>
    <option>Cuisine</option>
    <option>Forgeron</option>
    <option>Enchanteur</option>
    <option>Tribal</option>
    <option>Ing&eacute;nieur</option>
    <option>Joalier</option>
    <option>aucun</option>
    </select></td> 
</tr> 
</table> 
<br /> 
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr class="row2"> 
<th><span class="genmed">Pourquoi voulez-vous joindre Supr&eacute;matie,? soyer pr&eacute;cis :</span></th> 
<th><span class="genmed">Votre derni&egrave;re  Guilde (Inclure noms de la guild , l'adresse internet ,ainsi que la raison du d&eacute;part ?):</span></td> 
<th><span class="genmed">Votre experience en Raid </span></th> 
</tr> 
<tr class="row1"> 
<td> 
<div style="text-align:center"> 
<textarea class="post" name="whyjoin" cols="27" rows="5" id="whyjoin"> 
</textarea class="post"></div></td> 
<td> 
<div style="text-align:center"> 
<textarea class="post" name="prevguild" cols="27" rows="5" id="prevguild"> 
</textarea class="post">
</div></td> 
<td class="row2"> 
<div style="text-align:center"> 
<textarea class="post" name="preraidexp" cols="27" rows="5" id="preraidexp"> 
</textarea class="post"></div></td> 
</tr> 
</table> 
<br /> 
<table width="100%" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr> 
<th><span class="style2">Ajouter les autres informations(exemple temp de jeu ect...)?</span></td>
</tr> 
<tr> 
<td class="row2"><div style="text-align:center">
<textarea class="post" name="additional" cols="90" rows="5" id="additional">
 
</textarea></div></td> 
</tr> 
</table> 
<br /> 
<table width="100%" align="center" cellpadding="3" cellspacing="1" class="forumline"> 
<tr> 
<th><div id="result_box" dir="ltr">Avez-vous des amis dans Supr&eacute;matie? (Si oui ? veuillez nous donnez le nom d'entre eux) </div></th> 
<th>Avez vous acceptez la <a href="http://suprematie.wow-heberge.com/viewtopic.php?t=13">charte</a> et allez L'apliquez? </th> 
</tr> 
<tr> 
<td class="row2"><div style="text-align:center">
<textarea class="post" name="friends" cols="45" rows="5" id="friends">
 
</textarea></div></td> 
 
<td class="row2"><div style="text-align:center">
<select name="xrealm" id="xrealm">
  <option>Non</option>
  <option>Oui</option>
</select></div></div></td> 
</tr> 
</table> 
<br /> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumline"> 
<tr> 
<td class="cat" align="center"><input type="hidden" id="submitapp" name="submitapp" value="1" /><input type="submit" class="mainoption" name="Submit" value="Postez !!!" /> </td> 
</tr> 
</table> 
</form> 
</body> 
</html> 
 
<? 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 
?>
ensuite mon fichier avec la fonction insert_post :

Fichier insert_post.php

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
<?php
define('IN_PHPBB', true);

//player and character info
$class = $_POST['charclass'];
$clevel = $_POST['charlevel'];
$cname = $_POST['charname'];
$rname = $_POST['realname'];
$age = $_POST['playerage'];
$loc = $_POST['location'];
$prof1 = $_POST['prof1'];
$prof2 = $_POST['prof2'];
$xrealm = $_POST['xrealm'];
//Prev Guild info
$pgn = $_POST['prevguild'];
$raidexp = $_POST['preraidexp'];
//raidtimeinfio
$time1 = $_POST['day1'];
$time2 = $_POST['day2'];
$time3 = $_POST['day3'];
$time4 = $_POST['day4'];
$time5 = $_POST['day5'];
$time6 = $_POST['day6'];
$time7 = $_POST['day7'];
//reputation info
$thrall = $_POST['thrallrep'];
$lower = $_POST['lowerrep'];
$shatar = $_POST['sharep'];
$cenarion = $_POST['cenrep'];
$keepers = $_POST['keeprep'];
//attunements
$kara = $_POST['karatune'];
$temp = $_POST['temptune'];
$serp = $_POST['serptune'];
$ony = $_POST['onytune'];
//divers 
$kara1 = $_POST['karatune3'];
$temp1 = $_POST['temptune3'];
$serp1 = $_POST['serptune3'];
$ony1 = $_POST['onytune3'];

//additonal info
$reccomend = $_POST['friends'];
$whyapply = $_POST['whyjoin'];
$add = $_POST['additional'];
$tol= $_POST['tolorance'];

//allow html for formatting
$html_on = false;
$bbcode_on = false;
$smilies_on =false;

// modify this to point to your phpbb directory, relevent to this file. e.g. './phpBB2/'
$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'mods/netclectic/includes/functions_insert_post.'.$phpEx);

// choose a user
$user_id = 104 ;

// initialise the userdata
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, 'Could not obtain lastvisit data from user table', '', __LINE__, __FILE__, $sql);
}
$userdata = $db->sql_fetchrow($result);
init_userprefs($userdata);

// update the users last visit time
$current_time = time();
$sql = "UPDATE " . USERS_TABLE . " 
	SET user_session_time = $current_time, user_session_page = " . PAGE_INDEX . ", user_lastvisit = $current_time
	WHERE user_id = $user_id";
if ( !$db->sql_query($sql) )
{
	message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
}
$userdata['user_lastvisit'] = $last_visit;

// pick a forum to add out post to
$forum_id = 7;

$message = "Information General " . "\n" . "\n" . "Vrai Nom : " . $rname . "\n" . "Age : " . $age . "\n" . "Non du joueur : " . $cname ."\n" . "Classe : " . $class . "\n" . "Level : " . $clevel . "\n" . "Profession Principale : " . $prof1 . "\n" . "Profession secondaire : " . $prof2 . "\n" . "Heure Local : " . $loc . "\n" . "Lien Armurery  : " . "http://armory.wow-europe.com/character-sheet.xml?r=Medivh&n=".$cname. "\n" . "\n".  "Disponibilté en semaine" . "\n" . "\n" . "Lundi : " . $time1 . "\n" . "Mardi : " . $time2 . "\n" . "Mercredi : " . $time3 . "\n" . "Jeudi : " . $time4 . "\n" . "Vendredi : " . $time5 . "\n" . "Samedi: " . $time6 . "\n" . "Dimanche : " . $time7 . "\n" . "\n" . "Previous Guild Information" . "\n" . "\n" . $pgn . "\n" . "\n" . "Vos dernière Guilde , Url , et la raison du départ  : " . "\n" . "\n" . $raidexp . "\n" . "\n" . "Réputation en mode héro" . "\n" . "\n" . "Expedition Cenarienne  : " . $cenarion . "\n" . "Gardiens du temps : " . $keepers . "\n" . "Ville Basse : " . $lower . "\n" . "Bastion Honneur : " . $thrall . "\n" . "Sha'Tar : " . $shatar . "\n" . "\n" . "Accés Obtenu" . "\n" . "Karahzan : " . $kara . "\n" . "Mt Hyjal : " . $ony . "\n" . "SSC : " . $serp . "\n" . "Temple Noir : " . $temp . "\n" . "\n" .  " Information complémentaire" . "\n" . "Vous avez des ami(e)s qui font partie de notre Guilde ? : " . $reccomend . "\n" . "\n" . "Pourquoi rejoindre Suprématie  ?" . "\n" . "\n" . $whyapply . "\n" . "\n" . " Information Supplémentaire" . "\n" . "\n" . $add . "\n" . "Jour jouer par semaines : " . $tol . "\n" . "Acceptez vous la charte de Guilde " . $xrealm . "\n" . "\n";

if ( $message != '' )
{
                 
    $subject = $class . " [ Nom du player =>>] " . $cname;
    $post_details = insert_post($message, $subject, $forum_id, $userdata['user_id'], $userdata['username'], $userdata['user_attachsig']);
    $url = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $post_details['topic_id']);
	header( 'Location: http://www.google.fr) ;
    }
?>
voila lors de la validation du fichier recrutement.php

je recoit l'erreur avec une belle blanche qui mensionne ceci :

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
Notice: Undefined index: kruul in :\insert_post.php on line 53
 
Notice: Undefined index: emeriss in :\insert_post.php on line 54
 
Notice: Undefined index: lethon in :\insert_post.php on line 55
 
Notice: Undefined index: taeerar in :\insert_post.php on line 56
 
Notice: Undefined index: ysondre in :\insert_post.php on line 57
 
Notice: Undefined index: kazzak in :\insert_post.php on line 58
 
Notice: Undefined index: doomwalker in :\insert_post.php on line 59
 
Notice: Undefined index: kara_key in :\insert_post.php on line 61
 
Notice: Undefined index: tk_key in :\insert_post.php on line 62
 
Notice: Undefined index: cfr_key in :\insert_post.phpon line 63
 
Notice: Undefined index: hfc_key in :\insert_post.php on line 64
 
Notice: Undefined index: cot_key in :\insert_post.php on line 65
 
Notice: Undefined index: auch_key in :\insert_post.php on line 66
 
Notice: Undefined index: cpu in :\insert_post.php on line 68
Warning: Cannot modify header information - headers already sent by (output started at insert_post.php:7) in _post.php on line 195
si je remplit entiérement le formulaire et coche toute les cases j'otiens simpelment cette erreur :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
Warning: Cannot modify header information - headers already sent by (output started at insert_post.php:7) in _post.php on line 195
Enfin pour ma part je ne voit pas d'erreur dans le formulaire mes bon peut etre que j'ai mal coder celui -ci


Merci de m'éclairer

Cordialement