et mon script d'envoi qui fonctione (je reçois bien les mails)
sauf qu'avec le code suivant
Header("Location:index.php");
j'ai une page d'erreur et si je ne mets pas cette ligne j'ai une page blanche...Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/drcplus/public/wp-content/themes/drc/form_action_contact.php:1) in /var/www/htdocs/drcplus/public/wp-content/themes/drc/form_action_contact.php on line 61
alors que j'aimerais être redirigé vers la racine du site....
quelqu'un peut il m'aiguiller
Merci
<?php
$boundary = "-----=".md5(uniqid(rand()));
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n";
$header .= "\r\n";
$msg = "Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\r\n";
$msg = "Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\r\n";
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
$msg .= "Content-Transfer-Encoding:8bit\r\n";
$msg .= "\r\n";
$msg .= $_POST['msg'];
$msg .= "\r\n";
$msg .= "--$boundary--\r\n";
$destinataire = "[email protected]";
$expediteur = $_POST['mail'];
$reponse = $expediteur;
//echo "Ce script envoie un mail avec fichier attaché é $expediteur";
mail($destinataire, $_POST['subject'], $msg,
"Reply-to: $reponse\r\nFrom: $expediteur\r\n".$header);
Header("Location:index.php");
?>
<form action="/wp-content/themes/drc/form_action_contact.php" method="post" enctype="multipart/form-data" name="info_form" onsubmit="return validation()">
<table border="0" cellpadding="5" cellspacing="0" width="">
<tr>
<td>Prénom :</td>
<td><input type="text" name="Prenom" size="35"/></td>
</tr>
<tr>
<td>Nom :</td>
<td><input type="text" name="Nom" size="35"/></td>
</tr>
<tr>
<td>Email :</td>
<td><input type="text" name="mail" size="35"/></td>
</tr>
<tr>
<td colspan="2">Quel est l'objet de votre mail?</td>
</tr>
<tr>
<td colspan="2"><input type="text" name="subject" size="100"/></td>
</tr>
<tr>
<td colspan="2">Vos commentaires, vos suggestion ou questions :</td>
</tr>
<tr>
<td colspan="2"><textarea rows="12" name="msg" cols="75"></textarea></td>
</tr>
<tr>
<td><input type="reset" value="Effacer"></td>
<td align="left"><input type="submit" value="Envoyer"></td>
</tr>
</table>
</form>