Script php vs version php sur le serveur
Résolu
Bonjour,
Depuis que j'ai changé de serveur pour hébergé mes sites web. Mes formulaires de contact avec php ne fonctionnent plus.
Voici le message d'erreur que je reçois lorsque je fait "envoyé".
Warning: Variable passed to each() is not an array or object in /home/wwwspher/public_html/fr/web/js/formmail.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwspher/public_html/fr/web/js/formmail.php:10) in /home/wwwspher/public_html/fr/web/js/formmail.php on line 16
ET LE CODE PHP:
<?php
$TO = "***@***";
$h = "From: " . $TO;
$message = "";
$subject = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
if(!empty($val)){
$message .= "$val : $key\n";
}
}
mail($TO, $subject, $message, $h);
Header("Location: http://www.website.com");
?>
Depuis que j'ai changé de serveur pour hébergé mes sites web. Mes formulaires de contact avec php ne fonctionnent plus.
Voici le message d'erreur que je reçois lorsque je fait "envoyé".
Warning: Variable passed to each() is not an array or object in /home/wwwspher/public_html/fr/web/js/formmail.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwspher/public_html/fr/web/js/formmail.php:10) in /home/wwwspher/public_html/fr/web/js/formmail.php on line 16
ET LE CODE PHP:
<?php
$TO = "***@***";
$h = "From: " . $TO;
$message = "";
$subject = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
if(!empty($val)){
$message .= "$val : $key\n";
}
}
mail($TO, $subject, $message, $h);
Header("Location: http://www.website.com");
?>