Tom's Guide > Forum > Programmation > formulaire
Mot :    Pseudo :           
 

Bonjour, j'ai un problem avec mon formulaire, il m'envoie plus de message et un code d'erreur s'affiche le voici:
Parse error: parse error, unexpected T_STRING in d:\www\33immobilier.com\htdocs\contact.php on line 24

Voici mon formulaire:


<form method="post" action="contact.php"
name="formulaire2" onsubmit="return verif_champs()">
<table
style="text-align: left; margin-left: auto; margin-right: auto; width: 483px; height: 295px;"
border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(43, 209, 154);"><span
style="color: rgb(204, 51, 204);">NOM:</span><span
style="color: rgb(255, 0, 0);">*</span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
name="NOM"></td>
</tr>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160);"><span
style="color: rgb(204, 51, 204);">Prénom:</span><span
style="color: rgb(255, 0, 0);">*</span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
name="Prenom"></td>
</tr>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160);"><span
style="color: rgb(255, 0, 0);"></span><span
style="color: rgb(204, 51, 204);">Code Postal:</span><span
style="color: rgb(255, 0, 0);"></span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
size="7" name="Code Postal"></td>
</tr>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160);"><span
style="color: rgb(204, 51, 204);">Tel:</span><span
style="color: rgb(255, 0, 0);">*</span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
size="15" name="Tel"></td>
</tr>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160);"><span
style="color: rgb(255, 0, 0);"></span><span
style="color: rgb(204, 51, 204);">Fax:</span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
size="15" name="Fax"></td>
</tr>
<tr align="left">
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160); color: rgb(204, 51, 204);">E-mail:</td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><input
name="e-mail"></td>
</tr>
<tr>
<td
style="width: 153px; text-align: right; background-color: rgb(44, 218, 160);"><span
style="color: rgb(204, 51, 204);">Votre message</span><span
style="color: rgb(255, 0, 0);">*</span></td>
<td
style="width: 430px; background-color: rgb(44, 218, 160);"><textarea
wrap="soft" cols="30" rows="5" name="Commentaires



et voici le code php



<?php


$sujet = date("d/m/Y H:i:s" )." Contact";
$contenu = "";
$contenu .= "Nom : ".$_POST['NOM']."\n";
$contenu .= "Prénom : ".$_POST['Prenom']."\n";
$contenu .= "Code Postal:".$_POST['Code Postal']."\n";
$contenu .= "Tel: ".$_POST['Tel']."\n";
$contenu .= "Fax: ".$_POST['Fax']."\n";
$contenu .= "e-mail: ".$_POST['e-mail']."\n";
$contenu .= "Commentaires: ".$_POST['Commentaires']."\n";






if(mail("comert@hotmail.fr", $sujet, $contenu))
{
print "<b>Mail envoyé
<br>
<a
style="text-decoration: underline; font-weight: bold; color: rgb(51, 51, 255);"
href="index.html">RETOUR à l'accueil</a>
</b>";
}
else
{
print "<b>Erreur</b>";
}

?>

merci d'avance

Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.

Citation :

if(mail("comert@hotmail.fr", $sujet, $contenu))
{
print "<b>Mail envoyé
<br>
<a
style="text-decoration: underline; font-weight: bold; color: rgb(51, 51, 255);"
href="index.html">RETOUR à l'accueil</a>
</b>";
}


php ne doit plus s'y retrouver avec les ", tu dois utiliser un caractère d'echapement pour les caractères spéciaux


Message édité par Anonyme le 17-06-2007 à 01:22:03
Répondre à Anonyme
Tom's Guide > Forum > Programmation > formulaire
Aller à :

Il y a 1308 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens