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

HTML Discussion :

[HTML] Problème envoi formulaire


Sujet :

HTML

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    1
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 1
    Points : 2
    Points
    2
    Par défaut [HTML] Problème envoi formulaire
    Bonjour à tous et bonnes fêtes.........

    J'essaie d'envoyer un formulaire de commande par email avec un script PHP. Ce script marche bien mais j'ai un problème au niveau de l'html puisque je ne reçois pas les données du formulaire, juste un email vide avec un objet défini.
    Je place ici une copie de la source. Si quelqu'un peut me renseigner sur l'erreur que j'ai commise, je lui souhaite tout un tas de bon truc pour 2008.............bon les autres aussi.
    Merci.


    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
    </head>
     
    <body bgcolor="#FF6600" text="black" link="blue" vlink="purple" alink="red">
    <p>&nbsp;</p>
    <form vname="f1" action="PHPFormmail.php" method="post" enctype="multipart/form-data" name="f1">
    <form name="f1">
    <p align="center"><b><span style="font-size:22pt;">FORMULAIRE DE COMMANDE</span></b></p>
    <p align="center"><span style="font-size:12pt;"><font face="Arial" color="#003300">Comptez vingt minutes de préparation après l'envoi de votre commande. Merci.</font></span></p>
    <p>
    <table width="451" align="center">
    <tr>
    <td width="96" bordercolor="black" bgcolor="#339900">
    <p align="center"><b><font color="white">Article</font></b></p>
    </td>
    <td width="96" bordercolor="black" bgcolor="#339900">
    <p align="center"><b><font color="white">Quantité</font></b></p>
    </td>
    <td width="97" bordercolor="black" bgcolor="#339900">
    <p align="center"><b><font color="white">Prix par unité</font></b></p>
    </td>
    <td width="135" bordercolor="black" bgcolor="#339900">
    <p align="center"><b><font color="white">Prix selon
    quantité</font></b></p>
    </td>
    </tr>
    <tr>
    <td width="96">Article</td>
    <td width="96"> 
    <p align="center"><input type="text" size="3" name="c1" onchange="calculerPrix(this);" /></p>
    </td>
    <td width="97"> 
    <p align="center"><input type="text"
    size="6" name="c1unite" value="29.90" /></p>
    </td>
    <td width="135"> 
    <p align="center"><input type="text" name="c1prix" size="6" value="0.00" /></p>
    </td>
    </tr>
    <tr>
    <td width="96">Article </td>
    <td width="96">
     
    <p align="center"><input type="text" size="3" name="c2" onchange="calculerPrix(this);" /></p>
    </td>
    <td width="97"> 
    <p align="center"><input type="text" size="6" name="c2unite" value="89.90" /></p>
    </td>
    <td width="135">
     
    <p align="center"><input type="text" name="c2prix" size="6" value="0.00" /></p>
    </td>
    </tr>
    <tr>
    <td width="96">Article 3</td>
    <td width="96"> 
    <p align="center"><input type="text" size="3" name="c3" onchange="calculerPrix(this);"
    /></p>
    </td>
    <td width="97"> 
    <p align="center"><input type="text" size="6" name="c3unite" value="9.95" /></p>
    </td>
    <td width="135"> 
    <p align="center"><input type="text" name="c3prix" size="6" value="0.00" /></p>
    </td>
    <td width="5">
     
    <tr>
    <td width="96">Article 4</td>
    <td width="96"> 
    <p align="center"><input type="text" size="3" name="c4" onchange="calculerPrix(this);"
    /></p>
    </td>
    <td width="97"> 
    <p align="center"><input type="text" size="6" name="c4unite" value="3.95" /></p>
    </td>
    <td width="135"> 
    <p align="center"><input type="text" name="c4prix" size="6" value="0.00" /></p>
    </td>
    <td width="5">
     
    <tr>
    <td width="96">Article 5</td>
    <td width="96">
    <p align="center"><input type="text" size="3" name="c5" onchange="calculerPrix(this);"
    /></p>
    </td>
    <td width="97">
    <p align="center"><input type="text" size="6" name="c5unite" value="2.95" /></p>
    </td>
    <td width="135">
    <p align="center"><input type="text" name="c5prix" size="6" value="0.00" /></p>
    </td>
    </tr>
    <tr>
    <td width="96">Frais
    de port</td>
    <td width="96">
    <p align="center">&nbsp;</p>
    </td>
    <td width="97">
    <p align="center">&nbsp;</p>
    </td>
    <td width="135"> 
    <p align="center"><input type="text" name="port" value="0.00" size="6" /> </p>
    </td>
    </tr>
    <tr>
    <td width="96">TVA</td>
    <td width="96">
    <p align="center">&nbsp;</p>
    </td>
    <td width="97">
    <p align="center">&nbsp;</p>
    </td>
    <td width="135">
     
    <p align="center"><input type="text" name="tva" value="0.00" size="6" /> </p>
    </td>
    </tr>
    <tr>
    <td width="96">TOTAL</td>
    <td width="96">&nbsp;</td>
    <td width="97">&nbsp;</td>
    <td width="135"> 
    <p align="center"><input type="text" name="total"
    value="0.00" size="6" /> </p>
    </td>
    </tr>
    </table>
    <div align="left">
     
    <p align="center"><input type="submit" value="Envoyer"></p>
    </div>
    </p>
    </form>
     
    </form>
    </body>
     
    </html>

  2. #2
    Inactif  
    Avatar de Kerod
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    11 672
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 11 672
    Points : 20 778
    Points
    20 778
    Par défaut
    Déjà côté (X)HTML ça commence très mal et je doute que ce code soit valide W3C. Ca te sert à quoi d'avoir des form imbriqués ? Ca n'aide pas la validation non plus.

    Sinon ton problème est plus du ressort PHP vu que c'est lui qui traite les données envoyées. Alors solution : Commence par retirer l'imbrication, refais un test et si ça passe pas alors tu postes ton code PHP.

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    16
    Détails du profil
    Informations personnelles :
    Âge : 49
    Localisation : France, Drôme (Rhône Alpes)

    Informations forums :
    Inscription : Décembre 2007
    Messages : 16
    Points : 20
    Points
    20
    Par défaut
    Bonjour,

    Comme dit ci-dessus, un seul <form></form> suffit.

    Si tu reçois un mail vide, le problème ne vient pas du fichier html mais plutôt du fichier php.

    Tu trouveras probablement plus de réponses du côté des forums php.

    Ceci dit comment récupéres-tu les variables de tes input ???

    ça doit être du style $_REQUEST['c1'] ou $_POST['c1'] par exemple.

    Cordialement

    David

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème envoi formulaire (syntaxe ?)
    Par templari dans le forum Langage
    Réponses: 21
    Dernier message: 14/04/2011, 16h56
  2. Problème envoi formulaire sur touche entrer
    Par mike1310 dans le forum VBA Access
    Réponses: 7
    Dernier message: 05/03/2009, 16h19
  3. [MySQL] MySQL: Problème d'incrémentation, PHP/HTML: Problème de formulaire
    Par ykseb dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 22/01/2009, 14h49
  4. [Mail] Problème envoi formulaire par mail
    Par Nicos77 dans le forum Langage
    Réponses: 5
    Dernier message: 10/11/2005, 17h11
  5. [HTML] Problème d'envoi de formulaire
    Par autumn319 dans le forum ASP
    Réponses: 26
    Dernier message: 03/09/2003, 10h06

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