par
newmen » 15 déc. 2020, 11:09
Bonjour,
Merci pour votre réponse.
Voici l'url de la page du formulaire:
https://royalpromotion.ch/formulaire.html
et ci-dessous le code du fichier qui traite le formulaire:
<?php
session_start();
if(isset($_POST['captcha'])) {
if($_POST['captcha'] == $_SESSION['captcha']) {
echo "Captcha valide !";
Header("Location:
https://royalpromotion.ch/formulaire.html");
header('content-type: text/html; chartset=iso-8859-1');
$TO = "
[email protected]";
$h = "From: ".$TO;
$suject = "Demande de renseignements";
while (list($key, $val) = each($_POST)) {
$message .= "$key : $val\n";
}
mail($TO, $suject, $message, $h);
Header("Location:
https://royalpromotion.ch/confirmation-contact.html");
}
else {
echo "Captcha invalide....";
Header("Location:
https://royalpromotion.ch/erreur-captcha.html");
}
}
?>
Bonjour,
Merci pour votre réponse.
Voici l'url de la page du formulaire: https://royalpromotion.ch/formulaire.html
et ci-dessous le code du fichier qui traite le formulaire:
<?php
session_start();
if(isset($_POST['captcha'])) {
if($_POST['captcha'] == $_SESSION['captcha']) {
echo "Captcha valide !";
Header("Location:https://royalpromotion.ch/formulaire.html");
header('content-type: text/html; chartset=iso-8859-1');
$TO = "
[email protected]";
$h = "From: ".$TO;
$suject = "Demande de renseignements";
while (list($key, $val) = each($_POST)) {
$message .= "$key : $val\n";
}
mail($TO, $suject, $message, $h);
Header("Location:https://royalpromotion.ch/confirmation-contact.html");
}
else {
echo "Captcha invalide....";
Header("Location:https://royalpromotion.ch/erreur-captcha.html");
}
}
?>