formulaire & fonction mail()
Bonjour,
je suis entrin de faire un formuliare pour envoi de mail mais ca m'affiche cette erreur:
Notice: Undefined index: nom in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 2
Notice: Undefined index: prenom in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 3
Notice: Undefined index: town in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 4
Notice: Undefined index: phone in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 5
Notice: Undefined index: mail in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 6
Notice: Undefined index: reponse in c:program fileseasyphp1-8wwwtogodumevisend_mail.php on line 7
voici mon code php
voici mon formulaire:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 <?php $nom = $_POST['nom']; $prenom = $_POST['prenom']; $town = $_POST['town']; $phone = $_POST['phone']; $mail=$_POST['mail']; $reponse = $_POST['reponse']; $adr = "jeu_wu@togodumevi.com"; $obj = "Jeu"; //Le message qui vous est envoyé $reponse_envoye = 'nom : ' . $nom ."rn". 'prenom :' . $prenom . "rn". 'phone : ' . $phone ."rn" . 'mail : ' . $mail ."rn" . 'reponse : ' . $reponse ."rn" . mail($adr, $obj, $reponse_envoye ); ?>
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 <form action="send_mail.php" method="post" name="contactform" id="contactform" enctype="text/plain"> <table cellspacing="2"> <tbody> <tr> <td align="right" nowrap="nowrap"> <strong>Nom: *</strong></td> <td> <input name="nom" class="input-textfield-contactform" id="name" type="text"> </td> </tr> <tr> <td align="right" nowrap="nowrap"> <strong>Prénom: *</strong></td> <td> <input name="prenom" class="input-textfield-contactform" id="prenom" type="text"> </td> </tr> <tr> <td align="right" nowrap="nowrap"> <strong>Ville: *</strong></td> <td> <input name="town" class="input-textfield-contactform" id="town" type="text"> </td> </tr> <tr> <td align="right" nowrap="nowrap"> <strong>Téléphone: *</strong></td> <td> <input name="phone" class="input-textfield-contactform" id="phone" value="" type="text"> </td> </tr> <tr> <td align="right" nowrap="nowrap"> <strong>Mail: *</strong></td> <td> <input name="mail" class="input-textfield-contactform" id="mail" value="" type="text"> </td> </tr> <tr valign="top"> <td> <br><b>vos réponses :</b> *</td> <td><textarea name="reponse" cols="25" rows="5" class="textarea-textfield-contactform" id="reponse"> 1- 2- 3- </textarea> </td> </tr> <tr valign="top"> <td> <input value="envoyer" onClick="javascript:if (testcontactform()) { document.contactform.submit(); }" type="button"/> </td> </tr> </tbody></table> </form>
j'ai besoin de votre aide, merci
Partager