par
Invité » 08 sept. 2005, 13:18
J'ai presque le même problème je veux que mon formulaire puisse envoyer les caractère accentués de manière correcte voici le script:
Merci de me guider
<?php
## -- --------- START OF CONFIG SECTION --------- ##
## STEP ONE: Change the info below to your details
$SendToEmail = "[email protected]"; ## Your Email Address
$YourWebsiteURL = "http://www.test.ca/"; ## Your Website URL
$YourName = "test"; ## Your Name or Company Name
$yoursubject = "Formulaire de rapport du $date $datee $dateee" ; ## The Email Subject Line
$ThankyouURL = "merci.htm"; ## Send them here after they have filled in the form
## STEP TWO: Change details below for the email footer of the confirmation email.
$EmailFooter = "
Merci,
L'équipe de test
Web: http://www.test.ca/";
## ---------- END OF CONFIG SECTION ------------- ##
## If they call this page direct from the browser, send them away because they havent filled in the form!
if(!isset($email)) {
header("location: $YourWebsiteURL"); ## Redirect them to your websites front page
exit();
}
## Send the Email to you ....
$yoursubject = "$yoursubject";
$emailtext = "
-----------------------------------------------------------------------------
".$yoursubject."
-----------------------------------------------------------------------------
".$prenom." ".$nom." a envoyé son rapport du: ".$date." ".$datee." ".$dateee."
1-Prénom du Rep: || ".$prenom."
-----------------------------------------------------------------------------
2-Nom du Rep: || ".$nom."
-----------------------------------------------------------------------------
Merci,
".$YourName."
".$YourWebsiteURL."
";
$yoursubject = stripslashes($yoursubject);
$emailtext = stripslashes($emailtext);
@mail("$SendToEmail", $yoursubject, $emailtext, "From: $email"); ## Email Sent
## Now lets send a thankyou email to the sender
$emailsubject = "Re: ".$yoursubject."";
$autoemail = "
-----------------------------------------------------------------------------
Re: ".$yoursubject."
-----------------------------------------------------------------------------
Merci ".$prenom." ".$nom." Pour le rapport du: ".$date." ".$datee." ".$dateee."
Voici une copie de votre rapport de la journée
1-Prénom du Rep: || ".$prenom."
-----------------------------------------------------------------------------
2-Nom du Rep: || ".$nom."
-----------------------------------------------------------------------------
".$EmailFooter."
";
$yoursubject = stripslashes($yoursubject);
$autoemail = stripslashes($autoemail);
@mail($email, $emailsubject, $autoemail, "From: $SendToEmail "); ## Email Sent
## The emails have both been sent, so we should now send the user to a confirmation page
header("Location: $ThankyouURL"); ## Don't change this, change the $ThankyouURL at the top!
exit;
## That's it !
?>
J'ai presque le même problème je veux que mon formulaire puisse envoyer les caractère accentués de manière correcte voici le script:
Merci de me guider
[php]
<?php
## -- --------- START OF CONFIG SECTION --------- ##
## STEP ONE: Change the info below to your details
$SendToEmail = "
[email protected]"; ## Your Email Address
$YourWebsiteURL = "http://www.test.ca/"; ## Your Website URL
$YourName = "test"; ## Your Name or Company Name
$yoursubject = "Formulaire de rapport du $date $datee $dateee" ; ## The Email Subject Line
$ThankyouURL = "merci.htm"; ## Send them here after they have filled in the form
## STEP TWO: Change details below for the email footer of the confirmation email.
$EmailFooter = "
Merci,
L'équipe de test
Web: http://www.test.ca/";
## ---------- END OF CONFIG SECTION ------------- ##
## If they call this page direct from the browser, send them away because they havent filled in the form!
if(!isset($email)) {
header("location: $YourWebsiteURL"); ## Redirect them to your websites front page
exit();
}
## Send the Email to you ....
$yoursubject = "$yoursubject";
$emailtext = "
-----------------------------------------------------------------------------
".$yoursubject."
-----------------------------------------------------------------------------
".$prenom." ".$nom." a envoyé son rapport du: ".$date." ".$datee." ".$dateee."
1-Prénom du Rep: || ".$prenom."
-----------------------------------------------------------------------------
2-Nom du Rep: || ".$nom."
-----------------------------------------------------------------------------
Merci,
".$YourName."
".$YourWebsiteURL."
";
$yoursubject = stripslashes($yoursubject);
$emailtext = stripslashes($emailtext);
@mail("$SendToEmail", $yoursubject, $emailtext, "From: $email"); ## Email Sent
## Now lets send a thankyou email to the sender
$emailsubject = "Re: ".$yoursubject."";
$autoemail = "
-----------------------------------------------------------------------------
Re: ".$yoursubject."
-----------------------------------------------------------------------------
Merci ".$prenom." ".$nom." Pour le rapport du: ".$date." ".$datee." ".$dateee."
Voici une copie de votre rapport de la journée
1-Prénom du Rep: || ".$prenom."
-----------------------------------------------------------------------------
2-Nom du Rep: || ".$nom."
-----------------------------------------------------------------------------
".$EmailFooter."
";
$yoursubject = stripslashes($yoursubject);
$autoemail = stripslashes($autoemail);
@mail($email, $emailsubject, $autoemail, "From: $SendToEmail "); ## Email Sent
## The emails have both been sent, so we should now send the user to a confirmation page
header("Location: $ThankyouURL"); ## Don't change this, change the $ThankyouURL at the top!
exit;
## That's it !
?>
[/php]