Pourriez-vous me dire ce qui cloche???

petit paume Messages postés 3 Statut Membre -  
petit paume Messages postés 3 Statut Membre -
Bonjour, et merci par avance de votre aide.

Petit debutant, j'ai réussi a créer mon formulaire HTML (grace a WebCreator5...)
et j'ai donc ouvert une page php pour récupérer les informations
Néanmoins, apres la mise en place je ne recois pas le formulaire, mais ceci:

From: togmal.com
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
mais pas le contenu de $objet et $msg....

le code de ma page est:

<?php

$destinataire= "pascal@togmal.com";
$objet = "Contact Turpialito";
$headers = "From: togmal.com\n\r";
$headers .= "MIME-Version: 1.0\n\r";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n\r";

$nom = $_POST['nom'];
$courriel = $_POST['courriel'];
$pays = $_POST['pays'];
$arrivee = $_POST['arrivee'];
$depart = $_POST['depart'];
$commentaires = $_POST['commentaires'];

$msg = "nom = $nom
courriel = $courriel
pays = $pays
arrivee = $arrivee
depart = $depart
commentaires = $commentaires";

echo nl2br($msg);
mail($destinataire, $objet, $headers, $msg);
echo "formulaire envoyé.";

Header("Location: http://www.togmal.com/contact.html" )

?>

ou ais-je fauté???
Merci de votre aide
Retirer de la liste des messages cités Ajouter à la liste des messages cités Edition rapide Editer le message

4 réponses

dreustounet Messages postés 21 Statut Membre 3
 
il semblerait que la fonction nl2br ne renvoie que les informations de ton header, serait-il possible de voir cette fonction ?

Cordialement
0
petit paume Messages postés 3 Statut Membre
 
merci pour ta réponse.
Je suis vraiment "petit paumé". Le sript php, je l'ai copié dans un forum.
En fait j'ai un formulaire bati avec Web Creator en html, et je ne l'ai pas touché si ce n'est la fonction action.
Je te passe le script:
<form method=post id='Form1' name='Form1' enctype='text/plain' action='contact.php' onsubmit=FireEvent('Form1','_OnSubmit') onreset=FireEvent('Form1','_OnReset')>
<DIV id=Champ1 class="cChamp1">
<input type='text' id='objChamp1' name='nom' size=30 maxlength=50 onclick=FireEvent('Champ1','_OnClick'); ondblclick=FireEvent('Champ1','_OnDblClick'); onmousedown=FireEvent('Champ1','_OnMouseDown'); onmouseup=FireEvent('Champ1','_OnMouseUp'); onfocus=FireEvent('Champ1','_OnEnter'); onblur=FireEvent('Champ1','_OnLeave'); onchange=FireEvent('Champ1','_OnChange'); onkeydown=FireEvent('Champ1','_OnKeyDown'); onkeypress=FireEvent('Champ1','_OnKeyPress'); onkeyup=FireEvent('Champ1','_OnKeyUp'); onselect=FireEvent('Champ1','_OnSelect'); ><br/>
</DIV>
<DIV id=Champ2 class="cChamp2">
<input type='text' id='objChamp2' name='courriel' size=30 maxlength=50 onclick=FireEvent('Champ2','_OnClick'); ondblclick=FireEvent('Champ2','_OnDblClick'); onmousedown=FireEvent('Champ2','_OnMouseDown'); onmouseup=FireEvent('Champ2','_OnMouseUp'); onfocus=FireEvent('Champ2','_OnEnter'); onblur=FireEvent('Champ2','_OnLeave'); onchange=FireEvent('Champ2','_OnChange'); onkeydown=FireEvent('Champ2','_OnKeyDown'); onkeypress=FireEvent('Champ2','_OnKeyPress'); onkeyup=FireEvent('Champ2','_OnKeyUp'); onselect=FireEvent('Champ2','_OnSelect'); ><br/>
</DIV>
<DIV id=Champ3 class="cChamp3">
<input type='text' id='objChamp3' name='pays' size=30 maxlength=50 onclick=FireEvent('Champ3','_OnClick'); ondblclick=FireEvent('Champ3','_OnDblClick'); onmousedown=FireEvent('Champ3','_OnMouseDown'); onmouseup=FireEvent('Champ3','_OnMouseUp'); onfocus=FireEvent('Champ3','_OnEnter'); onblur=FireEvent('Champ3','_OnLeave'); onchange=FireEvent('Champ3','_OnChange'); onkeydown=FireEvent('Champ3','_OnKeyDown'); onkeypress=FireEvent('Champ3','_OnKeyPress'); onkeyup=FireEvent('Champ3','_OnKeyUp'); onselect=FireEvent('Champ3','_OnSelect'); ><br/>
</DIV>
<DIV id=Champ4 class="cChamp4">
<textarea id='objChamp4' name='commentaires' cols=30 rows=10 onclick=FireEvent('Champ4','_OnClick'); ondblclick=FireEvent('Champ4','_OnDblClick'); onmousedown=FireEvent('Champ4','_OnMouseDown'); onmouseup=FireEvent('Champ4','_OnMouseUp'); onfocus=FireEvent('Champ4','_OnEnter'); onblur=FireEvent('Champ4','_OnLeave'); onchange=FireEvent('Champ4','_OnChange'); onkeydown=FireEvent('Champ4','_OnKeyDown'); onkeypress=FireEvent('Champ4','_OnKeyPress'); onkeyup=FireEvent('Champ4','_OnKeyUp'); onselect=FireEvent('Champ4','_OnSelect'); >
</textarea>
</DIV>
<DIV id=Champ5 class="cChamp5">
<input type='text' id='objChamp5' name='arrivee' size=9 value='JJ/MM/AAAA' onclick=FireEvent('Champ5','_OnClick'); ondblclick=FireEvent('Champ5','_OnDblClick'); onmousedown=FireEvent('Champ5','_OnMouseDown'); onmouseup=FireEvent('Champ5','_OnMouseUp'); onfocus=FireEvent('Champ5','_OnEnter'); onblur=FireEvent('Champ5','_OnLeave'); onchange=FireEvent('Champ5','_OnChange'); onkeydown=FireEvent('Champ5','_OnKeyDown'); onkeypress=FireEvent('Champ5','_OnKeyPress'); onkeyup=FireEvent('Champ5','_OnKeyUp'); onselect=FireEvent('Champ5','_OnSelect'); ><br/>
</DIV>
<DIV id=Champ6 class="cChamp6">
<input type='text' id='objChamp6' name='depart' size=9 value='JJ/MM/AAAA' onclick=FireEvent('Champ6','_OnClick'); ondblclick=FireEvent('Champ6','_OnDblClick'); onmousedown=FireEvent('Champ6','_OnMouseDown'); onmouseup=FireEvent('Champ6','_OnMouseUp'); onfocus=FireEvent('Champ6','_OnEnter'); onblur=FireEvent('Champ6','_OnLeave'); onchange=FireEvent('Champ6','_OnChange'); onkeydown=FireEvent('Champ6','_OnKeyDown'); onkeypress=FireEvent('Champ6','_OnKeyPress'); onkeyup=FireEvent('Champ6','_OnKeyUp'); onselect=FireEvent('Champ6','_OnSelect'); ><br/>
</DIV>
</form>
0
le père
 
Bonjour

Tu as inversé $headers et $msg dans ton appel à la fonction mail...
0
le père
 
Bonjour

Tu as inversé $headers et $msg dans ton appel à la fonction mail
0
petit paume Messages postés 3 Statut Membre
 
merci beaucoup de vos réponses. Il y a des progres, maintenant je recois ceci comme reponse du formulaire:

nom = courriel = pays = arrivee = depart = commentaires =

lol...

j'ai reellement besoin de vous....
0