Précédent   Forum des professionnels en informatique > PHP > Langage > Formulaires
Formulaires Forum d'entraide sur les formulaires avec PHP. Avant de poster -> FAQ formulaires, Cours de formulaires et Sources de formulaires
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 11/08/2011, 17h40   #1
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Par défaut Problème formulaire + PHP

Bonjour,

Je souhaite créer un jeu concours "Pronostics" sur le site internet de mon club. Voici le lien de la page :

http://www.usmeilleraiefoot.fr/prono...pronostics.php

J'ai quelques problèmes pour finaliser mon projet :

1) Voici le message qui s'affiche lorsque je valide mes paris : "Parse error: syntax error, unexpected '?' in /homez.150/usmeille/www/pronostics/envoi.php on line 21"

2) Je ne reçois aucun mail suite à la validation des pronostics

3) Lorsque que je vais recevoir les résultats, je recevrais 6 mails (1 par match). Comment faire pour en recevoir un seul ?

Merci de votre aide,

PS : Voici mon code :
Code :
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
?&gt;<?php if(!empty($_POST['m1'])){
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg =  ''.$_POST['nom'].'a choisi "Domicile" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m2'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m3'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m4'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Domicile" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m5'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m6'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m7'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Domicile" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m8'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m9'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m10'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Domicile" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m11'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m12'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m13'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Domicile" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m14'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m15'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m16'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Domicile" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m17'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Nul" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
?&gt;<?php if(!empty($_POST['m18'])){
 
 
 
$destinataire = 'pronostics@usmeilleraiefoot.fr';
 
$sujet = 'Résultats';
 
$left = 'Pronostics';
 
$right = '';
 
$msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
$var = 'From '. $left.' <'.$right.'>' ."r/n";
 
mail($destinataire, $sujet, $msg, $var);
}
 
 
?>
</head><body><br>
 
</body></html>
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 17h48   #2
Responsable Développement Web

 
Avatar de Bovino
 
Homme Didier Mouronval
Développeur Web
Inscription : juin 2008
Messages : 13 807
Détails du profil
Informations personnelles :
Nom : Homme Didier Mouronval
Âge : 41
Localisation : France, Gironde (Aquitaine)

Informations professionnelles :
Activité : Développeur Web
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : juin 2008
Messages : 13 807
Points : 35 797
Points : 35 797
Ben tu vois pas dans ton code que toutes les fermetures de balises PHP sont transformées en ?&gt; ?
Et d'ailleurs, c'est quoi l'utilité de fermer la balise si à chaque fois, tu la réouvres juste après ?
__________________
Pas de question technique par MP !
Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
Vous possédez un blog et aimeriez diffuser vos billets sur le forum, contactez-moi !
Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
Mon livre sur jQuery
Bovino est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 17h56   #3
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Ce n'est pas moi qui ai codé, j'ai eu besoin d'aide car je n'y connais pas grand chose en PHP. Quelles sont les erreurs et comment les résoudre ?
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h04   #4
Membre Expert
 
Avatar de kdmbella
 
Homme Demazy Mbella
Développeur Web
Inscription : août 2010
Messages : 620
Détails du profil
Informations personnelles :
Nom : Homme Demazy Mbella
Localisation : Cameroun

Informations professionnelles :
Activité : Développeur Web
Secteur : High Tech - Produits et services télécom et Internet

Informations forums :
Inscription : août 2010
Messages : 620
Points : 1 470
Points : 1 470
je te conseille la rubrique http://php.developpez.com/ de developpez.com et la tu trouvera des tutoriel qui te donnerons la base en php
__________________
Trois personnes peuvent garder un secret si deux d'entre elles sont mortes. :Benjamin Franklin
L'humanité se divise en trois catégories : ceux qui ne peuvent pas bouger, ceux qui peuvent bouger, et ceux qui bougent : Benjamin Franklin
Le hasard, c'est le déguisement que prend Dieu pour voyager incognito: Albert Einstein
bon je m'arrête là au risque de me faire buter
kdmbella est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h09   #5
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Mon code est totalement faux ou il y a juste quelques petites erreurs ? Si vous pouvez m'aider directement, ça serait plus simple que de passer par des "cours PHP" que je ne comprends même pas..
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h12   #6
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
Bonjour :
- tout 1er ?&gt;<?php -> remplacer par <?php
- tous les autre -> les supprimer

Et comme d'hab', de la lecture (facile à lire et à comprendre) :
- PHP : Le tutoriel pour grands débutants pressés
- PHP et les formulaires
- Envoyer un mail en PHP
Citation:
Envoyé par c_bou98 Voir le message
Mon code est totalement faux ? ...
A partir du moment où tu ne vois pas ?&gt;, difficile de faire mieux que te conseiller de lire les tutos.
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h22   #7
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
D'accord, mais mes "m1, m2, m3, ..., m18" correspondaient à des cases bien précises (ex: m1 = match 1, victoire "domicile"; m2 = match 1, match "nul"; m3 = match 1, victoire "extérieur" et ainsi de suite).

Si je supprime ces formules, comment cela va-t-il fonctionner ?
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h32   #8
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
A la rigueur, je peux t'enseigner quelques bases de japonais :
konnichi wa : bonjour
konban wa : bonsoir
sayonara : adieu
mata ne : a bientot
arigatoo : merci

Mais pour ton code, je ne peux rien ... désolé.

Sérieusement, toi-même, sais-tu à quoi sert ce code et comment il fonctionne ?
Je t'assures que lire les tutos te fera du bien !
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 11/08/2011, 18h39   #9
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Oui je sais à quoi il sert :

J'ai 6 matchs à pronostiquer

Sur chaque match, 3 réponses possible : domicile, nul, extérieur

match 1 : m1 = domicile ; m2 = nul ; m3 = extérieur
match 2 : m4 = domicile ; m5 = nul ; m6 = extérieur
...

Lorsque le "pronostiqueur" choisit ses 6 réponses, celles-ci doivent me revenir par mail sous la forme :

"nom" a choisi "Domicile" pour EquipeA - EquipeB

Il n'y a pas longtemps, j'avais réussi à recevoir le mail, mais je recevais 1 mail par match (donc 6 mails = encombrant)

Maintenant, je ne reçois même plus de mail donc le code est mauvais, voilà le problème
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h43   #10
Modérateur
 
Avatar de FirePrawn
 
Homme Sébastien
Ingénieur réalisateur
Inscription : mars 2011
Messages : 773
Détails du profil
Informations personnelles :
Nom : Homme Sébastien
Âge : 24
Localisation : France, Haut Rhin (Alsace)

Informations professionnelles :
Activité : Ingénieur réalisateur
Secteur : Industrie

Informations forums :
Inscription : mars 2011
Messages : 773
Points : 2 332
Points : 2 332
Citation:
Envoyé par c_bou98 Voir le message
Oui je sais à quoi il sert :

J'ai 6 matchs à pronostiquer

Sur chaque match, 3 réponses possible : domicile, nul, extérieur

match 1 : m1 = domicile ; m2 = nul ; m3 = extérieur
match 2 : m4 = domicile ; m5 = nul ; m6 = extérieur
...

Lorsque le "pronostiqueur" choisit ses 6 réponses, celles-ci doivent me revenir par mail sous la forme :

"nom" a choisi "Domicile" pour EquipeA - EquipeB

Il n'y a pas longtemps, j'avais réussi à recevoir le mail, mais je recevais 1 mail par match (donc 6 mails = encombrant)

Maintenant, je ne reçois même plus de mail donc le code est mauvais, voilà le problème
Bonsoir,
Il me semble qu'il y a eu assez de réponses concernant ton code. Commence par supprimer ces ?&gt qui sortent d'on ne sait-où.
Pour ton mail, plutôt que de faire 6 fois la même chose, tu fais une boucle dans laquelle tu stockes les réponses des pronostics dans un tableau, et à la fin, tu t'envoies par mail ce tableau.
__________________
- Avant toute chose : lire le mode d'emploi du forum et ses règles.
- avant de poster
- Je ne réponds pas aux questions techniques en MP.
FirePrawn est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h44   #11
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
Ne nous énervons pas ...

et reprenons depuis le début :
- peux-tu afficher le formulaire de saisi des pronostics ? (qui l'a écrit )

ps : on vois que ton code est du copier-coller.
Il peut être "facilement" optimisé si tu donnes plus d'infos (du code)

Pour l'envoi d'un mail en php, tout est ici.
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 18h49   #12
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Voilà le code de mon formulaire sur la page "pronostics.php" :
Code html :
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
<form style="margin-left: 20px; margin-right: 20px;" method="post"
action="envoi.php" name="MonFormulaire"> <small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;"></span></small>
<table
style="text-align: left; width: 520px; height: 192px; margin-left: auto; margin-right: auto;"
border="0" cellpadding="3" cellspacing="1">
<tbody>
<tr>
<td
style="text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/all_grey.png); background-position: center; width: 164px;"><small>1<br>
</small></td>
<td
style="text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;"><small>D<br>
</small></td>
<td
style="text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;"><small>N<br>
</small></td>
<td
style="text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;"><small>E<br>
</small></td>
<td
style="text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/all_grey.png); background-position: center; width: 164px;"><small>2<br>
</small></td>
</tr>
<tr>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">St
Florent des Bois<br>
</span></small></td>
<td style="text-align: center;"><input name="m1" value="m1"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m1" value="m2"
type="radio"></td>
<td style="text-align: center;"><input name="m1" value="m3"
type="radio"><br>
</td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">St
Prouant-Monsireigne</span></small><small style="color: rgb(51, 51, 51);"><span
style="font-family: Calibri;"><br>
</span></small></td>
</tr>
<tr>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Hermenault
Sérigné<br>
</span></small></td>
<td style="text-align: center;"><input name="m2" value="m4"
type="radio"></td>
<td style="text-align: center;"><input name="m2" value="m5"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m2" value="m6"
type="radio"></td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Grosbreuil<br>
</span></small></td>
</tr>
<tr
style="background-image: url(../Images/gold_wall.png); background-position: left center;">
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Meilleraie-Tillay<br>
</span></small></td>
<td style="text-align: center;"><input name="m3" value="m7"
type="radio"></td>
<td style="text-align: center;"><input name="m3" value="m8"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m3" value="m9"
type="radio"><br>
</td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">St
Aubin la Plaine<br>
</span></small></td>
</tr>
<tr>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Nieul
le Dolent<br>
</span></small></td>
<td style="text-align: center;"><input name="m4" value="m10"
type="radio"></td>
<td style="text-align: center;"><input name="m4" value="m11"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m4" value="m12"
type="radio"><br>
</td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Les
Essarts 2<br>
</span></small></td>
</tr>
<tr>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Talmont
St Hilaire<br>
</span></small></td>
<td style="text-align: center;"><input name="m5" value="m13"
type="radio"></td>
<td style="text-align: center;"><input name="m5" value="m14"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m5" value="m15"
type="radio"><br>
</td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Roche/Y
Robretières 2<br>
</span></small></td>
</tr>
<tr style="background-position: left center;">
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Roche/Y
Généraudière<br>
</span></small></td>
<td style="text-align: center;"><input name="m6" value="m16"
type="radio"></td>
<td style="text-align: center;"><input name="m6" value="m17"
type="radio"><br>
</td>
<td style="text-align: center;"><input name="m6" value="m18"
type="radio"><br>
</td>
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Nalliers
Foot Espoir<br>
</span></small></td>
</tr>
<tr>
<td style="vertical-align: top;"><br>
</td>
<td style="vertical-align: top;"><br>
</td>
<td style="vertical-align: top;"><br>
</td>
<td style="vertical-align: top;"><br>
</td>
<td style="vertical-align: top;"><br>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">Adresse
e-mail<br>
</span></small></td>
<td colspan="3" rowspan="1" style="vertical-align: top;"><input
name="mail"><br>
</td>
<td style="vertical-align: top;"><br>
</td>
</tr>
<tr>
<td
style="vertical-align: top; width: 100px; text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">NOM
- Prénom</span></small><br>
</td>
<td colspan="3" rowspan="1" style="vertical-align: top;"><input
name="nom"><br>
</td>
<td style="vertical-align: top; text-align: center;"><input
name="parier" value="Parier !" type="submit"><br>
</td>
</tr>
</tbody>
</table>
<hr style="width: 100%; height: 2px;"></form>

Pour le code de la page "envoi.php", c'est celui que j'ai mis plus haut dans la discussion
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 19h08   #13
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
Ca t'ennuierait de faire un petit effort pour rendre le code présentable ?
- indentation (tabulation), ...
Là, tout est en vrac ...

ps : sur ce forum, on est là pour aider à résoudre des problèmes de code.
Pas pour les écrire à la places des autres ... (même si je fait souvent du zèle ...)
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 19h10   #14
Modérateur
 
Avatar de FirePrawn
 
Homme Sébastien
Ingénieur réalisateur
Inscription : mars 2011
Messages : 773
Détails du profil
Informations personnelles :
Nom : Homme Sébastien
Âge : 24
Localisation : France, Haut Rhin (Alsace)

Informations professionnelles :
Activité : Ingénieur réalisateur
Secteur : Industrie

Informations forums :
Inscription : mars 2011
Messages : 773
Points : 2 332
Points : 2 332
Citation:
Envoyé par jreaux62 Voir le message
Ca t'ennuierait de faire un petit effort pour rendre le code présentable ?
- indentation (tabulation), ...
Là, tout est en vrac ...

ps : sur ce forum, on est là pour aider à résoudre des problèmes de code.
Pas pour les écrire à la places des autres ... (même si je fait souvent du zèle ...)
Dit-il alors qu'il sait pertinemment qu'il va lui réécrire
Sinon indente ton code, qu'on y voit plus clair. Là, ça donne pas envie de t'aider
__________________
- Avant toute chose : lire le mode d'emploi du forum et ses règles.
- avant de poster
- Je ne réponds pas aux questions techniques en MP.
FirePrawn est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 19h21   #15
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
Pour parodier une célèbre citation :
Citation:
" ... Donnez-moi un code, et je coderai un jour. Apprenez-moi à coder, et je coderai toujours ..."
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2011, 23h24   #16
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Beh désolé les mecs mais j'ai tout appris sur le tas, sans aucune aide donc je fais un peu du "bricolage" pour créer mon site web. Je pense bien que c'est pas facile pour vous qui êtes des experts mais bon, tant pis alors Si vous avez juste 2/3 tuyaux, je les prendrais volontier !
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/08/2011, 07h58   #17
Rédacteur
 
Avatar de jreaux62
 
Homme Jérôme Réaux
Webdesigner
Inscription : août 2008
Messages : 2 993
Détails du profil
Informations personnelles :
Nom : Homme Jérôme Réaux
Âge : 45
Localisation : France, Pas de Calais (Nord Pas de Calais)

Informations professionnelles :
Activité : Webdesigner
Secteur : Arts - Culture

Informations forums :
Inscription : août 2008
Messages : 2 993
Points : 5 786
Points : 5 786
Envoyer un message via Skype™ à jreaux62
Bonjour,
je ne suis pas un "expert", mais plutôt un "bon pédagogue".
Mon objectif est que tu comprennes les explications qu'on te donne.
Pas de te donner un code "tout fait" que tu te contenteras de copier-coller.

Donc : commence par "nettoyer ton code" signifie "remet de l'ordre".

Remplace PARTOUT les lignes mal écrites :
Code :
1
2
3
4
<td style="text-align: center;"><small
style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">St
Florent des Bois<br>
</span></small></td>
par :
Code :
1
2
3
<td style="text-align: center;">
	<small style="color: rgb(51, 51, 51);"><span style="font-family: Calibri;">St Florent des Bois<br></span></small>
</td>
Le code sera plus clair, et par conséquent plus facile à lire, et à corriger si nécessaire.

Idem pour l'autre code.
Ensuite, tu remets ces 2 codes corrigés dans ton prochain message.
Et là, on pourra envisager de regarder et chercher une solution.
ok ?
__________________
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
Nicolas Boileau-Despréaux, Homme de lettres français (1636-1711), principal théoricien de l'esthétique classique.
Site perso Mes tutos DVP : Gestion-Affichage de Nouvelles - Affichage en tableau HTML - Fonctions de redimensionnement d'images
jreaux62 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/08/2011, 15h33   #18
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
pronostics.php :
Code :
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
 
<form style="margin-left: 20px; margin-right: 20px;" method="post"
action="envoi.php" name="MonFormulaire" id="MonFormulaire">
  <table style=
  "text-align: left; width: 520px; height: 192px; margin-left: auto; margin-right: auto;"
  border="0" cellpadding="3" cellspacing="1">
    <tbody>
      <tr>
        <td style=
        "text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/all_grey.png); background-position: center; width: 164px;">
        <small>1<br /></small>
        </td>
        <td style=
        "text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;">
        <small>D<br /></small>
        </td>
        <td style=
        "text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;">
        <small>N<br /></small>
        </td>
        <td style=
        "text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/content_breves.png); background-position: center top; color: white;">
        <small>E<br /></small>
        </td>
        <td style=
        "text-align: center; font-family: Calibri; font-weight: bold; background-image: url(../Images/graph/all_grey.png); background-position: center; width: 164px;">
        <small>2<br /></small>
        </td>
      </tr>
      <tr>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">St Florent des
          Bois<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m1" value="m1" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m1" value="m2" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m1" value="m3" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">St
          Prouant-Monsireigne</span></small><small style=
          "color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;"><br /></span></small>
        </td>
      </tr>
      <tr>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Hermenault
          Sérigné<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m2" value="m4" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m2" value="m5" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m2" value="m6" type="radio" />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Grosbreuil<br /></span></small>
        </td>
      </tr>
      <tr style=
      "background-image: url(../Images/gold_wall.png); background-position: left center;">
      <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Meilleraie-Tillay<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m3" value="m7" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m3" value="m8" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m3" value="m9" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">St Aubin la
          Plaine<br /></span></small>
        </td>
      </tr>
      <tr>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Nieul le
          Dolent<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m4" value="m10" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m4" value="m11" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m4" value="m12" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Les Essarts
          2<br /></span></small>
        </td>
      </tr>
      <tr>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Talmont St
          Hilaire<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m5" value="m13" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m5" value="m14" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m5" value="m15" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Roche/Y Robretières
          2<br /></span></small>
        </td>
      </tr>
      <tr style="background-position: left center;">
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Roche/Y
          Généraudière<br /></span></small>
        </td>
        <td style="text-align: center;">
          <input name="m6" value="m16" type="radio" />
        </td>
        <td style="text-align: center;">
          <input name="m6" value="m17" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <input name="m6" value="m18" type="radio" /><br />
        </td>
        <td style="text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Nalliers Foot
          Espoir<br /></span></small>
        </td>
      </tr>
      <tr>
        <td style="vertical-align: top;">
          <br />
        </td>
        <td style="vertical-align: top;">
          <br />
        </td>
        <td style="vertical-align: top;">
          <br />
        </td>
        <td style="vertical-align: top;">
          <br />
        </td>
        <td style="vertical-align: top;">
          <br />
        </td>
      </tr>
      <tr>
        <td style="vertical-align: top; text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">Adresse
          e-mail<br /></span></small>
        </td>
        <td colspan="3" rowspan="1" style="vertical-align: top;">
          <input name="mail" /><br />
        </td>
        <td style="vertical-align: top;">
          <br />
        </td>
      </tr>
      <tr>
        <td style=
        "vertical-align: top; width: 100px; text-align: center;">
          <small style="color: rgb(51, 51, 51);"><span style=
          "font-family: Calibri;">NOM - Prénom</span></small><br />
        </td>
        <td colspan="3" rowspan="1" style="vertical-align: top;">
          <input name="nom" /><br />
        </td>
        <td style="vertical-align: top; text-align: center;">
          <input name="parier" value="Parier !" type=
          "submit" /><br />
        </td>
      </tr>
    </tbody>
  </table>
  <hr style="width: 100%; height: 2px;" />
</form>
envoi.php :
Code :
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <?php if(!empty($_POST['m1'])){
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour St Florent des Bois - St Prouant-Monsireigne</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Hermenault Sérigné - Grosbreuil</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Meilleraie-Tillay - St Aubin la Plaine</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Nieul le Dolent - Les Essarts 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Talmont St Hilaire - Roche/Y Robretières 2</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Domicile" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Nul" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
 
 
        $destinataire = 'pronostics@usmeilleraiefoot.fr';
 
        $sujet = 'Résultats';
 
        $left = 'Pronostics';
 
        $right = '';
 
        $msg = ''.$_POST['nom'].'a choisi "Extérieur" pour Roche/Y Généraudière - Nalliers Foot Espoir</br>' ;
 
        $var = 'From '. $left.' <'.$right.'>' ."r/n";
 
        mail($destinataire, $sujet, $msg, $var);
        }
 
 
        ?>
    <title></title>
  </head>
  <body>
    <p>
      <br />
    </p>
  </body>
</html>
J'ai fais ce que j'ai pu..
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 24/08/2011, 14h21   #19
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Par défaut c_bou98

Me revoilà (avec quelques petits cours de PHP en plus)
http://usmeilleraiefoot.fr/pronostics/pronostics.php

Après quelques essais, j'en suis arrivé à cela (envoi.php) :


Code :
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
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php if(!empty($_POST['m1'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg =  ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour St Florent des Bois - St Prouant-Monsireigne' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m2'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour St Florent des Bois - St Prouant-Monsireigne' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m3'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour St Florent des Bois - St Prouant-Monsireigne' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m4'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour Hermenault Sérigné - Grosbreuil' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m5'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour Hermenault Sérigné - Grosbreuil' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m6'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour Hermenault Sérigné - Grosbreuil' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m7'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour Meilleraie-Tillay - St Aubin la Plaine' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m8'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour Meilleraie-Tillay - St Aubin la Plaine' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m9'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour Meilleraie-Tillay - St Aubin la Plaine' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m10'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour Nieul le Dolent - Les Essarts 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m11'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour Nieul le Dolent - Les Essarts 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m12'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour Nieul le Dolent - Les Essarts 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m13'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour Talmont St Hilaire - Roche/Y Robretières 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m14'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour Talmont St Hilaire - Roche/Y Robretières 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m15'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour Talmont St Hilaire - Roche/Y Robretières 2' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m16'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Domicile" pour Roche/Y Généraudière - Nalliers Foot Espoir' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m17'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Nul" pour Roche/Y Généraudière - Nalliers Foot Espoir' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
if(!empty($_POST['m18'])){
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg = ''.$_POST['nom'].' ('.$_POST['mail'].') a choisi "Extérieur" pour Roche/Y Généraudière - Nalliers Foot Espoir' ;
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
}
?>
</head>
<body>
<big style="color: rgb(51, 51, 51); text-decoration: underline;"><span style="font-family: Calibri;">Merci de votre participation et bonne
chance !<br>
<br style="color: rgb(204, 0, 0);">
</span></big><a style="color: rgb(204, 0, 0);" href="../index.html"><span style="font-family: Calibri;"><small>&gt; Retour vers la page
d'accueil du site</small></span></a><big style="color: rgb(51, 51, 51); text-decoration: underline;"><span style="font-family: Calibri;"><br>
</span></big>
<br>
</body>
</html>
Il me manque désormais 2 choses :

- La technique pour ne recevoir qu'un seul mail (et non 6). J'ai parcouru les tutos et je n'y comprends vraiment rien du tout !

- Quand je reçois mes 6 mails, je reçois les conditions m1, m2, m3, m4, m5 et m6 alors que je devrais recevoir soit m1, m2 ou m3, puis soit m4, m5 ou m6, et ainsi de suite (c'est assez compliqué à expliquer)

Merci de votre compréhension,
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/08/2011, 10h51   #20
Invité de passage
 
Homme
Étudiant
Inscription : août 2011
Messages : 18
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant
Secteur : Communication - Médias

Informations forums :
Inscription : août 2011
Messages : 18
Points : 0
Points : 0
Par défaut Problème PHP

Voici mon code actuel :

Code :
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
 
<?php if(!empty($_POST['m1'])){
switch($_POST['m1'])
{
    case('1'): { $choix[1]='Domicile'; break ; }
    case('2'): { $choix[1]='Nul'; break ; }
    case('3'): { $choix[1]='Extérieur'; break ; }
}
$match[1] = 'St Florent des Bois - St Prouant-Monsireigne'
if(!empty($_POST['m2'])){
switch($_POST['m2'])
{
    case('1'): { $choix[2]='Domicile'; break ; }
    case('2'): { $choix[2]='Nul'; break ; }
    case('3'): { $choix[2]='Extérieur'; break ; }
}
$match[2] = 'Hermenault Sérigné - Grosbreuil'
if(!empty($_POST['m3'])){
switch($_POST['m3'])
{
    case('1'): { $choix[3]='Domicile'; break ; }
    case('2'): { $choix[3]='Nul'; break ; }
    case('3'): { $choix[3]='Extérieur'; break ; }
}
$match[3] = 'Meilleraie-Tillay - St Aubin la Plaine'
if(!empty($_POST['m4'])){
switch($_POST['m4'])
{
    case('1'): { $choix[4]='Domicile'; break ; }
    case('2'): { $choix[4]='Nul'; break ; }
    case('3'): { $choix[4]='Extérieur'; break ; }
}
$match[4] = 'Nieul le Dolent - Les Essarts 2'
if(!empty($_POST['m5'])){
switch($_POST['m5'])
{
    case('1'): { $choix[5]='Domicile'; break ; }
    case('2'): { $choix[5]='Nul'; break ; }
    case('3'): { $choix[5]='Extérieur'; break ; }
}
$match[5] = 'Talmont St Hilare - Roche/Y Robretières 2'
if(!empty($_POST['m6'])){
switch($_POST['m6'])
{
    case('1'): { $choix[6]='Domicile'; break ; }
    case('2'): { $choix[6]='Nul'; break ; }
    case('3'): { $choix[6]='Extérieur'; break ; }
}
$match[6] = 'Roche/Y Généraudière - Nalliers Foot Espoir'
$destinataire = 'postmaster@usmeilleraiefoot.fr';
$sujet = 'Résultats';
$left = 'Pronostics';
$right = '';
$msg =  '';
$i=0;
while(isset($match[$i]))
{
   $i++;
   $msg = "\r\n".'a choisi "'.$choix[$i].'" pour '.$match[$i] ;
}
$var = 'From '. $left.' <'.$right.'>' ."r/n";
mail($destinataire, $sujet, $msg, $var);
?>
Il ne fonctionne pas, pourquoi ?
c_bou98 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 11h06.


 
 
 
 
Partenaires

Hébergement Web