Salut, su mon site j'ai un formulaire qui fonctionnait bien il y a quelques mois, je m'en occupait plus mais là je vient de m'appercevoir qu'il ne fonctionne plus.
Je recoit un mail vide et un ce message s'affiche sur la page du site:
Warning: Variable passed to each() is not an array or object in /comptes1/adremeve/public_html/formmail.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /comptes1/adremeve/public_html/formmail.php:8) in /comptes1/adremeve/public_html/formmail.php on line 14
Les lignes html :
<article id="adh">
<form method=POST action=formmail.php >
<input type=hidden name=subject value=formmail>
<fieldset>
<p>
<label for="mail">Mail :</label>
<input type="text" name="mail" id="mail" size="30" maxlength="50" />
</p>
<p>
<label for="TEL">n° Tel* :</label>
<input type="text" name="tel" id="tel" size="30" maxlength="10" />
</p>
<p>
<label for="Ville">Ville :</label>
<input type="text" name="ville" id="ville" size="30" maxlength="50" />
</p>
<legend>Infos complémentaires</legend> <!-- Titre du fieldset -->
<p>
<label for="nom">Votre Nom :</label>
<input type="text" name="nom" id="nom" size="30" maxlength="50" />
</p>
<p>
<label for="pseudo">Votre Prénom :</label>
<input type="text" name="prenom" id="prenom" size="30" maxlength="50" />
</p>
<p>
<label for="precisions">Message :</label></br>
</br><textarea name="Message" id="Message" cols="60" rows="7"></textarea>
</p>
<p class="poi">* éléments facultatifs</p>
</fieldset>
<p class="send">
<input type=submit value=Envoyer> -
<input type=reset value=Annuler>
</form>
</p>
</article>
Le php :
<?php
$TO = "mon mail
";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: redirection.html");
?>
Ca fait 4 heures que je rame, là j'avoue que je ne comprend pas mais pas du tout d'ou ça peut bien venir ..
Une idée ? 