Tout d'abord merci de bien vouloir prendre de ton temps pour me répondre.
Pour ce qui est de mon formulaire pour l'instant il envoi un mail vers une adresse mail spécifique. Par la suite je dois vérifier cela manuellement et envoyer les mails.
étape 1: vérifier si email est présent dans BDD "X" si c TRUE alors on passe à l'étape suivante, si c false on rajoute les données.
étape 2: vérifier si email est présent dans BDD 'Y' si c TRUE on echo un message, si c FALSE alors on l'inclus dans la BDD "Y" .
mon formulaire actuel est comme ceci ( ce qui est inadéquat ):
<?php
if ($_POST["email"]<>'') {
$ToEmail = '
[email protected]';
$EmailSubject = 'formulaire de demande ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "nom: ".$_POST["nom"]."<br>";
$MESSAGE_BODY = "prenom: ".$_POST["prenom"]."<br>";
$MESSAGE_BODY = "adresse: ".$_POST["adresse"]."<br>";
$MESSAGE_BODY = "numero: ".$_POST["numero"]."<br>";
$MESSAGE_BODY = "codepostal: ".$_POST["codepostal"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "ref: ".nl2br($_POST["ref"])."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
<h5>Votre demande à été effectué</h5>
<h6>Vous recevrez bientôt un mail de confirmation</h6>
<?php
} else {
?>
<h5>Veuillez remplir le formulaire.</h5>
<form action="contact.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">Nom:</td>
<td width="71%"><input name="name" type="text" id="name" size="32"/></td>
</tr>
<tr>
<td width="29%" class="bodytext">Prénom:</td>
<td width="71%"><input name="prenom" type="text" id="prenom" size="32"/></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"/></td>
</tr>
<tr>
<td width="15%" class="bodytext">adresse:</td>
<td width="55%"><input name="adresse" type="text" id="adresse" size="32"/></td>
<td width="15%" class="bodytext">Numero:</td>
<td width="15%"><input name="numero" type="text" id="numero" size="2"/></td>
</tr>
<tr>
<td width="29%" class="bodytext">code postal:</td>
<td width="71%"><input name="codepostal" type="text" id="codepostal" size="32"/></td>
</tr>
<tr>
<td width="29%" class="bodytext">reference:</td>
<td width="71%"><input name="ref" type="text" id="ref" size="32"/></td>
</tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Envoyer"/></td>
</tr>
</table>
</form>
<?php
};
?>
Si tu pouvais me tuyauter un peu pour me dire ce qu'il faudrait faire ce serait super sympa ^^
Jerome