IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

EDI, CMS, Outils, Scripts et API PHP Discussion :

problème de formulaire de contact


Sujet :

EDI, CMS, Outils, Scripts et API PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Août 2007
    Messages
    412
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 412
    Par défaut problème de formulaire de contact
    Bonjour à toutes et à tous

    je dis toujours à ma fille : " Ne t’énerve pas essaie et si tu n'y arrive pas tu demande "

    donc je demande

    Après avoir lu pas mal de choses sur la création de formulaire j'en ai créé un.

    1- Pouvez vous me dire s'il est correct?
    2- je n'arrive pas a créer la page php qui envoi par mail, quelqu'un serait il m'aider cela fait deux semaines que je suis dessus

    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
    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
     
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Inscription Noel</title>
     
     
    <body>
     
     
    <p>Texte avant le formulaire</p>
     
     
    <!--debut du formulaire -->
     
     
    <!--méthode d'envoi -->
        <form action="traitement.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire">
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
            <p>
    <!--amicaliste identitee-->
               <label for="Amicaliste">Amicaliste</label> : <input type="text" name="Amicaliste" id="Amicaliste" placeholder="Nom & Prénom" /><br/>
     
     
    <!--amicaliste mail-->
            <label for="e-mail">e-m@il</label> : <input type="email" name="e-mail" id="e-mail" placeholder="e-mail" /><br/>
     
     
    <!--amicaliste option participation-->
     
     
           participera :<br />
           <input type="radio" name="Amicaliste_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
           <input type="radio" name="Amicaliste_participation" value="Non" id="Non" /> <label for="Non">Non</label><br /><br />
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--conjoint option participation-->
             Conjoint participera :<br/>
     
     
           <input type="radio" name="Conjoint_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
           <input type="radio" name="Conjoint_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°1-->
    <!--identité enfant N°1-->
     
     
            <label for="Enfant N°1">Enfant Nº1</label> : <input type="text" name="Enfant Nº1" id="Enfant N°1" placeholder="Nom & Prénom de lenfant Nº1" /><br/>
     
     
    <!--date de naissance enfant N°1-->
     
     
              <label for="DdN Enfant N°1">Date de naissance Enfant Nº1</label> : <input type="date" name="DdN Enfant Nº1" id=" DdN Enfant N°1" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°1 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°1_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°1_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°2-->
    <!--identité enfant N°2-->
     
     
              <label for="Enfant N°2">Enfant Nº2</label> : <input type="text" name="Enfant Nº2" id="Enfant N°2" placeholder="Nom & Prénom de lenfant Nº2" /><br/>
     
     
    <!--date de naissance enfant N°2-->
     
     
              <label for="DdN Enfant N°2">Date de naissance Enfant Nº2</label> : <input type="date" name="DdN Enfant Nº2" id=" DdN Enfant N°2" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°2 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°2_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°2_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°3-->
    <!--identité enfant N°3-->
     
     
              <label for="Enfant N°3">Enfant Nº3</label> : <input type="text" name="Enfant Nº3" id="Enfant N°3" placeholder="Nom & Prénom de lenfant Nº3" /><br/>
     
     
    <!--date de naissance enfant N°3-->
     
     
              <label for="DdN Enfant N°3">Date de naissance Enfant Nº3</label> : <input type="date" name="DdN Enfant Nº3" id=" DdN Enfant N°3" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°3 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°3_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°3_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°4-->
    <!--identité enfant N°4-->
     
     
              <label for="Enfant N°4">Enfant Nº4</label> : <input type="text" name="Enfant Nº4" id="Enfant N°4" placeholder="Nom & Prénom de lenfant Nº4" /><br/>
     
     
    <!--date de naissance enfant N°4-->
     
     
              <label for="DdN Enfant N°4">Date de naissance Enfant Nº4</label> : <input type="date" name="DdN Enfant Nº4" id=" DdN Enfant N°4" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°4 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°4_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°4_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°5-->
    <!--identité enfant N°5-->
     
     
              <label for="Enfant N°5">Enfant Nº5</label> : <input type="text" name="Enfant Nº5" id="Enfant N°5" placeholder="Nom & Prénom de lenfant Nº5" /><br/>
     
     
    <!--date de naissance enfant N°5-->
     
     
              <label for="DdN Enfant N°5">Date de naissance Enfant Nº5</label> : <input type="date" name="DdN Enfant Nº5" id=" DdN Enfant N°5" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°5 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°5_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°5_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------->
    <!--infos enfant N°6-->
    <!--identité enfant N°6-->
     
     
              <label for="Enfant N°6">Enfant Nº6</label> : <input type="text" name="Enfant Nº6" id="Enfant N°6" placeholder="Nom & Prénom de lenfant Nº6" /><br/>
     
     
    <!--date de naissance enfant N°6-->
     
     
              <label for="DdN Enfant N°6">Date de naissance Enfant Nº6</label> : <input type="date" name="DdN Enfant Nº6" id=" DdN Enfant N°6" placeholder="jj/mm/aaaa" /><br/>
     
     
    <!--Enfant N°6 option participation-->
            participera :<br />
     
     
            <input type="radio" name="Enfant N°6_participation" value="Oui" id="Oui" /> <label for="Oui">Oui</label><br />
               <input type="radio" name="Enfant N°6_participation" value="Non" id="Non" /> <label for="Non">Non</label><br/><br/>
     
     
     
     
              </p>
     <!--Bouton envoyer--> 
     
            <td></td>
                <td width="42%"><center>
                    <input type="reset" name="Submit" value="Réinitialiser le formulaire">
                </center></td>
                <td width="41%"><center>
                    <input type="submit" name="Submit" value="Envoyer">
                </center></td>
            </tr>
            </table>
       </form>
     
     
     
     
    <p>Texte après le formulaire</p>
     
     
    </head>
     
     
     
     
    </body>
    </html>
    merci a tous

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Montre nous ton code PHP pour l'envoi de l'email pour qu'on puisse t'aider.

    Concernant le formulaire, évite les noms comme "DdN Enfant Nº2", c'est source de problème et d'erreur.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Août 2007
    Messages
    412
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 412
    Par défaut
    oki donc

    je refait mon html et j'envoi mon php

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Août 2007
    Messages
    412
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 412
    Par défaut mon php
    voici ma page php

    tout n'est pas mis c'etait pour essai mais ca marche pas

    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
     
     
    <?php 
    $Amicaliste=$HTTP_POST_VARS['Amicaliste']; 
    $mail=$HTTP_POST_VARS['e-mail']; 
    $participera=$HTTP_POST_VARS['Amicaliste_participation']; 
     
     
     
     
     
     
    /////voici la version Mine 
    $headers = "MIME-Version: 1.0\r\n"; 
     
     
    //////ici on détermine le mail en format text 
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n"; 
     
     
    ////ici on détermine l'expediteur et l'adresse de réponse 
    $headers .= "From: $Amicaliste <$mail>\r\nReply-to : $Amicaliste <$mail>\nX-Mailer:PHP"; 
     
     
    $subject="Inscription Noel"; 
    $destinataire="le-meil.christophe-pro@sfr.fr"; //remplacez "webmaster@votre-site.com" par votre adresse e-mail
    $body="$participera"; 
    if (mail($destinataire,$subject,$body,$headers)) { 
    echo "Votre mail a été envoyé<br>"; 
    } else { 
    echo "Une erreur s'est produite"; 
    } 
    ?></p>
    <p align="center">Vous allez bientot etre redirigé vers la page d'acceuil<br>
    Si vous n'etes pas redirigé au bout de 5 secondes cliquez <a href="https://amicalespcherbourg.fr/s2/indexe.php">ici 
    </a></p>

  5. #5
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Qu'est ce que tu obtiens ?

    Remplace $HTTP_POST_VARS par $_POST
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  6. #6
    Membre éclairé
    Profil pro
    Inscrit en
    Août 2007
    Messages
    412
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 412
    Par défaut
    avec ta modif ça à l'air de fonctionner

    merci merci

    j'essaie de modifier pour tout mon formulaire avant de clôturer merci encore

Discussions similaires

  1. [2.x] Problème avec formulaire de contact dans le handler
    Par lapaupiette dans le forum Symfony
    Réponses: 2
    Dernier message: 16/04/2014, 10h01
  2. Problème de formulaire de contact
    Par aliaounnate dans le forum GTK+ avec PHP
    Réponses: 1
    Dernier message: 18/04/2013, 09h22
  3. Formulaire de contact
    Par meryem256 dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 1
    Dernier message: 18/05/2009, 17h43
  4. problème d'accents dans le formulaire de contact
    Par Rocket666 dans le forum Langage
    Réponses: 2
    Dernier message: 04/02/2006, 14h48
  5. Problème d'accès formulaire de contact
    Par Mystic26 dans le forum Langage
    Réponses: 7
    Dernier message: 16/09/2005, 16h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo