
babyboo
je ne parvient pas à avoir un message corret avec les bon accent quand j'envois sur hotmail avec g mail ca va je n'ai que ces deux boite comme test
voici mon code
<?php
function fonction1(){
$test=7;
$email= htmlentities( $_POST['email'], ENT_QUOTES);
$id= htmlentities($_POST['id'], ENT_QUOTES);
$prenom=htmlentities($_POST['prenom'], ENT_QUOTES);
$sexe= htmlentities($_POST['sexe'], ENT_QUOTES);
$societe= htmlentities($_POST['societe'], ENT_QUOTES);
$tva= htmlentities($_POST['tva'], ENT_QUOTES);
$code= htmlentities($_POST['code'], ENT_QUOTES);
$adresse=htmlentities( $_POST['adresse'], ENT_QUOTES);
$ville=htmlentities( $_POST['ville'], ENT_QUOTES);
$pays= htmlentities($_POST['pays'], ENT_QUOTES);
$tel= htmlentities($_POST['tel'], ENT_QUOTES);
$gsm= htmlentities($_POST['gsm'], ENT_QUOTES);
$fax= htmlentities($_POST['fax'], ENT_QUOTES);
$descr= htmlentities($_POST['descr'], ENT_QUOTES);
$url= htmlentities($_POST['url'], ENT_QUOTES);
$nowDay=date("d.m.Y");
$header = 'From: '.$email."\n"
.'MIME-Version: 1.0'."\n"
.'Content-Type: text/plain; charset="UTF-8"'."\n"
.'Content-Transfer-Encoding: 7bit'."\n\n";
$headers = '
MIME-Version: 1.0
Content-Type: multipart/alternative;
Content-Encoding: utf8
From: $email
';
$headers1 = '
MIME-Version: 1.0
Content-Type: multipart/alternative;
Content-Encoding: iso-8859-1
From: $Mailto
';
$header1 = 'From: '.$Mailto."\n"
.'MIME-Version: 1.0'."\n"
.'Content-Type: text/plain; charset="iso-8859-1"'."\n"
.'Content-Transfer-Encoding: 7bit'."\n\n";
$FormContent="
Les informations suivantes ont été recues le $nowDay \n\n
----------------------------------------------------------------------------\n
Nom: $id\n
Prénom: $prenom\n
Sexe: $sexe
----------------------------------------------------------------------------\n
Société: $societe\n
Tva: $tva\n
Adresse: $adresse\n
Code postal: $code\n
Commune: $ville\n
Pays: $pays\n
----------------------------------------------------------------------------\n
Téléphone: $tel\n
Mobile: $gsm\n
Fax: $fax\n
Courriel: $email\n
Site Web: $url\n
----------------------------------------------------------------------------\n
Message: $descr\n
";
$MailTo="aureliehostens@gmail.com";
if(isset($_POST['id'])&&(empty($_POST['id'])))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Nom <br/> </span> ");--$test;}
if(isset($_POST['id'])&& empty($_POST['prenom']))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Prenom <br/></span> "); --$test;}
if(isset($_POST['id'])&& empty($_POST['adresse']))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Adresse <br/></span> ");--$test;}
if(isset($_POST['id'])&& empty($_POST['code']))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Code postal <br/></span> ");--$test;}
if(isset($_POST['id'])&& empty($_POST['ville']))
{print("<span class=\"Style5\"> Vous n'avez pas rempli le champ Commune <br/></span> ");--$test;}
if(isset($_POST['id'])&& empty($_POST['tel']))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Téléphone <br/></span> ");--$test;}
if(isset($_POST['id'])&& empty($_POST['email']) && empty($_POST['id']))
{print(" <span class=\"Style5\"> Vous n'avez pas rempli le champ Courriel ou il n'est pas correct</span> ");--$test;}
//echo $test;
if($test==7 && !isset($_POST['id']))
{print(" Introduisez vos données pour nous contacter, nous vous répondrons dans les plus brefs délais: <br/>
Vos données resteront confidentielles et ne seront pas utilisées par des tiers ! <br/>
Les champs avec une * sont obligatoires ! ");}
if( !empty($_POST['email']) && !empty($_POST['tel'])&& !empty($_POST['ville']) && !empty($_POST['code']) && !empty($_POST['adresse']) && $test==7)
{
$sujet="reception des données visiteur (de $prenom $id)";
$sujet1="Confirmation de vos données personnelles (de vivai-piante.be)";
mail($MailTo, $sujet, $FormContent, $headers);
mail($email, $sujet1, $FormContent, $header1);
print("
Merci de votre envois, une confirmation vous parviendra à l'adresse courriel que vous nous avez fournie.");
}
}?>
je sais qu'il est un peus foui mais je debute et je me perd vite ;)
si vous pouvez m'aidez je serai trop contente pcq j'ai tout tester (je crois)
merci d'avance