j'utilise le code ci-dessous pour renvoyer à une page de merci après avoir complété un formulaire de contact.
Code : Tout sélectionner
<?php
$msg = "Nom:\t$_POST[champ1]\n";
$msg .= "Prenom:\t$_POST[champ2]\n";
$msg .= "Adresse:\t$_POST[champ3]\n";
$msg .= "Ville:\t$_POST[champ4]\n";
$msg .= "CP:\t$_POST[champ5]\n";
$msg .= "Pays:\t$_POST[champ6]\n";
$msg .= "Province:\t$_POST[champ7]\n";
$msg .= "Telephone:\t$_POST[champ8]\n";
$msg .= "E-Mail de contact:\t$_POST[zone_email]\n";
$msg .= "Commentaires:\t$_POST[zone_texte]\n";
$recipient = "[email protected]";
$subject = "Formulaire de reservation";
$mailheaders = "From: $_POST[zone_email]\n";
$mailheaders .= "Reply-To: $_POST[zone_email]\n\n";
mail($recipient, $subject, $msg, $mailheaders);
if($envoi) header("Location: http://www.auxcosmos.be/merci.html");
J'utilise le même code sur une autre site chez le même hébergeur et cela fonctionne ...
Serait-ce lié à la version de php?
Ci-après la version de php: ici
Merci pour votre aide.