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 04/03/2007, 00h30   #1
Invité de passage
 
Inscription : octobre 2006
Messages : 20
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 20
Points : 4
Points : 4
Par défaut formulaire de contact

Bonjour,

Sur mon site j'ai quelques formulaires de contact. Une fois remplie je reçoit sur ma boite email avec les informations qui était remplie sur le formulaire et avec l'adresse email de client qui a remplie le formulaire dans le champ DE.

J'ai changer l'hébergeur et j'ai mis mon site avec les formulaire en linges et sans rien changer je reçoit les email remplie des client mais vide et dans le champ DE c'est écrit ça : "web59672" <web59672@cgi04-ch.uk.clara.net>.

Merci de m'aider SVP.

PS: le formulaire fait appelle a une page php et voici son continu:
--------
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php 
 
$msg = "Nom: $nom\n"; 
$msg.= "Prénom: $prenom\n"; 
$msg.="Téléphone: $tel\n"; 
$msg .= "E-mail: $mail\n"; 
$msg .= "Message: $comment\n\n"; 
 
$recipient = "contact@monsite.com"; 
$subject = "contact"; 
 
$mailheaders = "From: $mail\n\n "; 
 
 
mail($recipient, $subject, $msg, $mailheaders); 
 
?> 
<script> 
alert("Votre message a été envoyé, vous allez recevoir une réponse dans les plus brefs délais."); 
{location.href="http://www.monsite.com"}; 
</script>
abelazi est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/03/2007, 11h24   #2
En attente de confirmation mail
 
Inscription : juin 2002
Messages : 6 164
Détails du profil
Informations forums :
Inscription : juin 2002
Messages : 6 164
Points : 6 404
Points : 6 404
Ce n'est qu'une partie de votre code. Toutefois, il semblerait que vous utilisez vos variables comme si register_globals était à on : il faut certainement remplacer les variables $nom, $prenom, $tel, ... par $_POST['nom'], $_POST['prenom'], $_POST['tel'], ... vu qu'elles proviennent d'un formulaire (méthode POST).


Julp.
julp est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/03/2007, 18h58   #3
Rédacteur
 
Avatar de RideKick
 
Homme
Directeur technique
Inscription : septembre 2006
Messages : 5 959
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Directeur technique
Secteur : High Tech - Produits et services télécom et Internet

Informations forums :
Inscription : septembre 2006
Messages : 5 959
Points : 10 889
Points : 10 889
Pourquoi ne pas utiliser la classe phpmailer ?

TUTO
__________________
Pas de questions techniques en MP please

Mon site perso
RideKick est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/03/2007, 19h13   #4
Membre habitué
 
Avatar de Alexandrebox
 
Inscription : août 2006
Messages : 613
Détails du profil
Informations forums :
Inscription : août 2006
Messages : 613
Points : 107
Points : 107
Dans ton code php, on ne voit pas le champ DE dont tu fais allusion.
Peux-tu mettre le code html du formulaire ici ou faire vraiment la liste des champs.

Le code est juste. Je pense que tu as fait des erreurs au niveau des champs.
Alexandrebox est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 18/03/2007, 21h16   #5
Invité de passage
 
Inscription : octobre 2006
Messages : 20
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 20
Points : 4
Points : 4
Par défaut voici le code de formulaire

Bonjour,

Merci pour votre aide rien a faire je reçoit pas les email.
voici le code de formulaire.

SVP est-ce que vous ouvez me donner les code php qui va avec mon formulaire .

Merci de m'aider

Codes :

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
 
</script></TD>
        <TD COLSPAN=4 ROWSPAN=2 bgcolor="#FFFFFF">
 
 
<!-------// html à inserer//---------------->
<table border="0" cellpadding="0" cellspacing="0" width="560">
<tr>
<td height="452" valign="top"><p class="txt">
 
<table cellspacing="0" cellpadding="0">
<tr>
<td vAlign="top" width="555" bgColor="#ffffff" height="250"><!--------//-->
<script language="javascript">
function verif(mail) 
     {
var arobase = mail.indexOf("@")
var point = mail.lastIndexOf(".")
if((arobase < 2)||(point + 2 > mail.length)||(point < arobase+2)) 
         { 
             alert("Votre mail est absent ou erroné !");
            document.contact.mail.focus();
             return false
         }
else 
         { 
                                  {
            if (contact.comment.value=="")
            {
                alert("Veuillez remplir le champ Commentaires");
                document.contact.comment.focus();
                return false;
         }
         else
         {            
 
                return true 
             }
         }
         }
}
 
 
 
</script>
<table border="0" cellpadding="0" cellspacing="0" width="550">
<tr>
<td valign="top"><form method="POST" action="require/contact.php" name="contact" onSubmit="return verif(this.mail.value)" enctype="multipart/form-data">
<p align="center" class="txt"> <br>
Pri&egrave;re de remplir votre demande en v&eacute;rifiant votre 
adresse E-mail.<br>
Les champs avec (<span class="bbr2 Style2">*</span>) sont obligatoires. </p>
<table width="488" height="297" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><p align="center" class="txt">&nbsp; </p>
<center>
<table width="461" height="238" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="25"><div align="left" class="txt"><strong>Nom 
:</strong></div></td>
<td width="11">&nbsp;</td>
<td width="238" height="25"><div align="left">
<input type="text" name="nom" size="25" />
</div></td>
</tr>
<tr>
<td width="200" height="22"><div align="left" class="txt"><strong>Pr&eacute;nom 
:</strong></div></td>
<td width="11" height="22">&nbsp;</td>
<td width="238" height="22"><div align="left">
<input type="text" name="prenom" size="25" />
</div></td>
</tr>
 
<tr>
<td width="200" height="22"><div align="left" class="txt"><strong> T&eacute;l&eacute;phone :</strong></div></td>
<td width="11" height="22">&nbsp;</td>
<td width="238" height="22"><div align="left">
<input type="text" name="tel" size="25" />
</div></td>
</tr>
<tr>
<td width="200" height="22"><div align="left" class="txt"><strong> E-mail :<span class="bbr2 Style2">*</span></strong></div></td>
<td width="11" height="22">&nbsp;</td>
<td width="238" height="22"><div align="left">
<input name="mail" type="text" id="mail" size="25" />
</div></td>
</tr>
<tr>
<td width="200" height="121" valign="top"><div align="justify">
<p align="justify"><strong class="txt">Commentaires:</strong><span class="bbr2 Style2">*</span><strong class="txt">&nbsp;&nbsp;</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><em><u><br />
</u></em></strong><em><u><strong> </strong></u></em> <span class="txt"> <br>
Si vous n'avez pas re&ccedil;u de r&eacute;ponse 
de notre part dans les 24 heures cela veut dire 
que vous avez mis une adresse email non valide, 
alors merci de nous contacter une autre fois et 
nous aurons le plaisir de vous r&eacute;pondre. </span> </p>
</div></td>
<td width="11" height="121" valign="top">&nbsp;</td>
<td width="238" height="121"><p>
<textarea name="comment" cols="25" rows="6" id="comment"></textarea>
</p></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="center"><div align="center"></div></td>
<td height="26" align="center">&nbsp;</td>
<td height="26" align="center"><div align="center">
<input name="submit" type="submit" id="submit" value="envoyer" />
&nbsp; </div></td>
</tr>
</table>
</center></td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--------//--> </td>
</tr>
</table>
abelazi 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 19h04.


 
 
 
 
Partenaires

Hébergement Web