|
La Communauté Webmaster 
| Pages: [1] |
 |
|
|
|
Auteur |
Sujet: [Résolu] Probleme envoi formulaire (Lu 801 fois) |
|
 |
[Résolu] Probleme envoi formulaire
« sur: le 25-08-2010 a 13:51:00 » |
|
begarcia
Membre récent

Hors-Ligne
Messages: 2

|
Bonjour à tous, possédant un hébergement mutualisé chez OVH, je n'arrive pas à trouver l'erreur qui serait dans mon code. En effet, la réception du mail envoyé par le formulaire ne m'indique pas le remplissage des champs.
VOICI CI-DESSOUS LE CODE DU FORMULAIRE DE LA PAGE HTML :
<form action="pageRenvoi.php" method="POST" name="MyForm" target="_blank" class="vignetteGauche" id="devis" onsubmit="MM_validateForm('nom','','R','prenom','','R','codepostal','','R','ville','','R','telephone','','R','mail','','RisEmail','adresse','','R','message','','R');return document.MM_returnValue"> <h3>Vos coordonnées</h3> <table width="450" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="88"><img src="img/formulaire/nom.gif" alt="nom" /></td> <td width="348"><input name="nom" type="text" id="nom" size="50" class="capitale"/></td> </tr> <tr> <td><img src="img/formulaire/prenom.gif" alt="prenom" /></td> <td><input name="prenom" type="text" id="prenom" size="50" /></td> </tr> <tr> <td><img src="img/formulaire/adresse.gif" alt="adresse" width="88" height="22" /></td> <td><textarea name="adresse" cols="45" id="adresse"></textarea></td> </tr> <tr> <td><img src="img/formulaire/codepostal.gif" alt="code postal" width="88" height="22" /></td> <td><input name="codepostal" type="text" id="codepostal" value="" size="50" /></td> </tr> <tr> <td><img src="img/formulaire/ville.gif" alt="ville" width="88" height="22" /></td> <td><input name="ville" type="text" id="ville" value="" size="50" /></td> </tr> <tr> <td><img src="img/formulaire/telephone.gif" alt="telephone" width="88" height="22" /></td> <td><input type="text" name="telephone" id="telephone" /></td> </tr> <tr> <td><img src="img/formulaire/email.gif" alt="email" width="88" height="22" /></td> <td><input name="mail" type="text" id="mail" size="50" /></td> </tr> </table> <h3>Votre demande</h3> <p><strong>Je désire être contacté(e) par <span class="orange">Pro'Stores & Fermetures Monaco</span> pour :</strong></p> <table width="450" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="218"> <input name="storeinterieur" type="checkbox" id="storeinterieur" /> stores intérieurs </td> <td width="218"><input type="checkbox" name="storeexterieur" id="storeexterieur" /> stores extérieurs</td> </tr> <tr> <td> <input type="checkbox" name="fenetre" id="fenetre" /> fenêtres </td> <td><input type="checkbox" name="portefenetre" id="portefenetre" /> porte-fenêtres</td> </tr> <tr> <td><input type="checkbox" name="portegarage" id="portegarage" /> porte de garage</td> <td><input type="checkbox" name="porteentree" id="porteentree" /> porte d'entrée</td> </tr> <tr> <td> <input type="checkbox" name="portail" id="portail" /> portail </td> <td><input type="checkbox" name="motorisationportail" id="motorisationportail" /> motorisation de portail</td> </tr> <tr> <td> <input type="checkbox" name="moustiquaire" id="moustiquaire" /> moustiquaire </td> <td><input type="checkbox" name="rideaumetallique" id="rideaumetallique" /> rideaux metalliques</td> </tr> <tr> <td> <input type="checkbox" name="veranda" id="veranda" /> véranda </td> <td><input type="checkbox" name="volet" id="volet" /> volets</td> </tr> <tr> <td> <input type="checkbox" name="motorisation" id="motorisation" /> motorisation / automatisme </td> <td><input type="checkbox" name="depannage" id="depannage" /> dépannage / entretien</td> </tr> <tr> <td colspan="2"><strong>Laissez-nous un message *</strong></td> </tr> <tr> <td colspan="2"><textarea name="message" cols="60" rows="6" id="message"></textarea></td> </tr> <tr> <td colspan="2" class="legend">les champs marqués d'une astérisque (*) sont obligatoires</td> </tr> <tr> <td><input type="submit" name="submit" id="submit" value="Envoyer" /></td> <td><input type="reset" name="clear" id="clear" value="Effacer" /></td> </tr> </table> </form>
CI-DESSOUS LE CODE PHP DE LA PAGE PHP :
</head>
<?php
//Pour définir chaque input du formulaire, ajouter le signe de dollar devant $msg = "Nom:\t$nom\n"; $msg .= "Prenom:\t$prenom\n"; $msg .= "Adresse:\t$adresse\n"; $msg .= "Code-postal:\t$codepostal\n"; $msg .= "Ville:\t$ville\n"; $msg .= "Telephone:\t$telephone\n"; $msg .= "Message:\t$message\n"; $msg .= "Store-interieur:\t$storeinterieur\n"; $msg .= "Store-exterieur:\t$storeexterieur\n"; $msg .= "Fenetre:\t$fenetre\n"; $msg .= "Porte-fenetre:\t$portefenetre\n"; $msg .= "Porte-garage:\t$portegarage\n"; $msg .= "Porte-entree:\t$porteentree\n"; $msg .= "Portail:\t$portail\n"; $msg .= "Motorisation-portail:\t$motorisationportail\n"; $msg .= "Moustiquaire:\t$moustiquaire\n"; $msg .= "Rideau-metallique:\t$rideaumetallique\n"; $msg .= "Veranda:\t$veranda\n"; $msg .= "Volet:\t$volet\n"; $msg .= "Motorisation:\t$motorisation\n"; $msg .= "Depannage:\t$depannage\n\n"; //Pourait continuer ainsi jusqu'à la fin du formulaire
$recipient = "XXXX@orange.fr"; $subject = "Formulaire de demande de devis du site Web";
$mailheaders = "From: Formulaire Site Web<> \n"; $mailheaders .= "Reply-To: $email\n\n";
mail($recipient, $subject, $msg, $mailheaders);
echo "<HTML><HEAD>"; echo "<TITLE>Envoi du formulaire!</TITLE></HEAD><BODY>"; echo "<center><img src=img/interface/index.gif /></center>"; echo "<P >Votre message a bien été envoyé! <br /> Nous vous répondrons dans les meilleurs délais.</P>"; echo "</BODY> </HTML>";
?>
<body> |
|
Merci d'ores et déjà pour l'attention que vous apporterez à ma question (dont j'attends la réponse avec beaucoup d'intérêt)
Bernard |
|
|
|
|
|
|
 |
Re:Probleme envoi formulaire
« Répondre #1 sur: le 25-08-2010 a 16:56:24 » |
|
|
|
|
 |
Re:Probleme envoi formulaire
« Répondre #2 sur: le 26-08-2010 a 09:11:02 » |
|
|
|
|
| Pages:
[1] |
|
|
|
| |
|
|