bonjour j ai un problem avec mon formulaire je l ai fait mais le formulaire n'envoie pas les champ suivant:
-type de transaction
-type de bien
-nb de piece
voici le code source de la page htmluis apres la page php
<html>
<head>
<title>formulaire</title>
</head>
<body>
<br>
<form method="post" action="envoi.php"
name="Formulaire" enctype="application/x-www-form-urlencoded">
<div style="text-align: left;"> <br>
<br>
<table
style="width: 588px; height: 676px; text-align: left; margin-left: auto; margin-right: auto;"
border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="text-align: right; width: 284px;">NOM<span
style="color: rgb(255, 0, 0);">*</span>:</td>
<td style="width: 284px;"><input name="NOM"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Prenom<span
style="color: rgb(255, 0, 0);">*</span>:</td>
<td style="width: 284px;"><input name="Prenom"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">N°</td>
<td style="width: 284px;"><input size="5"
name="N°"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Rue:</td>
<td style="width: 284px;"><input name="rue"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Code
postal:</td>
<td style="width: 284px;"><input size="7"
name="Code postal"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Villes:</td>
<td style="width: 284px;"><input name="villes"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Mobil:</td>
<td style="width: 284px;"><input name="mobil"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Telephone<span
style="color: rgb(255, 0, 0);">*</span>:</td>
<td style="width: 284px;"><input name="tel"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Fax:</td>
<td style="width: 284px;"><input name="fax"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">E-mail:</td>
<td style="width: 284px;"><input name="e-mail"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Type
de transaction:</td>
<td style="width: 284px;"><input
name="transaction" value="Type" type="radio">
A vendre - <input name="Type" value="Type"
type="radio">A louer</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Type
de bien:</td>
<td style="width: 284px;">
<select name="typedebien">
<option>Maison</option>
<option>Maison en pierre</option>
<option>Villa</option>
<option>Châlet</option>
<option>Apartement</option>
<option>studio T1/T1bis</option>
<option>T2/t2bis</option>
<option>T3 et +</option>
<option>Commerce</option>
<option>terrain</option>
<option>autres...</option>
</select>
</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Description
du bien:</td>
<td style="width: 284px;"><input name="Desc"></td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Surface:</td>
<td style="width: 284px;"><input size="5"
name="surface">m²</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Surface
du terrain:</td>
<td style="width: 284px;"><input size="5"
name="terrain">m²</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Prix:</td>
<td style="width: 284px;"><input size="10"
name="Prix">euro/€</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Nombre
de pieces:</td>
<td style="width: 284px;">
<select name="nbdepiece">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6 et +</option>
</select>
</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Grenier:</td>
<td style="width: 284px;">
<select name="Grenier">
<option>NON</option>
<option>OUI</option>
</select>
</td>
</tr>
<tr>
<td style="text-align: right; width: 284px;">Description:</td>
<td style="width: 284px;"><textarea wrap="soft"
cols="30" rows="5" name="Description"></textarea>
</td>
</tr>
</tbody>
</table>
<div style="text-align: center;"><input name="bouton"
value="Validez ici" type="submit"><br>
</div>
</div>
</form>
</body>
</html>
et le code php:
<?php
$sujet = date("d/m/Y H:i:s" )." (nouvelle maison)";
$contenu = "";
$contenu .= "Nom : ".$_POST['NOM']."\n";
$contenu .= "Prénom : ".$_POST['Prenom']."\n";
$contenu .= "N°:".$_POST['N°']."\n";
$contenu .= "rue: ".$_POST['rue']."\n";
$contenu .= "Code Postal: ".$_POST['Code Postal']."\n";
$contenu .= "villes: ".$_POST['villes']."\n";
$contenu .= "mobil: ".$_POST['mobil']."\n";
$contenu .= "tel: ".$_POST['tel']."\n";
$contenu .= "fax: ".$_POST['fax']."\n";
$contenu .= "e-mail: ".$_POST['e-mail']."\n";
$contenu .= "Type de transaction: ".$_POST['transaction']."\n";
$contenu .= "Type de bien: ".$_POST['typedebien']."\n";
$contenu .= "Desc: ".$_POST['Desc']."\n";
$contenu .= "surface: ".$_POST['surface']."\n";
$contenu .= "terrain: ".$_POST['terrain']."\n";
$contenu .= "Prix: ".$_POST['Prix']."\n";
$contenu .= "Nombre de pieces: ".$_POST['nbdepiece']."\n";
$contenu .= "Grenier: ".$_POST['Grenier']."\n";
$contenu .= "Description: ".$_POST['Description']."\n";
if(mail("comert@hotmail.fr", $sujet, $contenu))
{
print "<b>Mail envoyé</b>";
}
else
{
print "<b>Erreur</b>";
}
?>
merci d avance
Afficher la suite