Bonjour à tous,
Mon formulaire de contact ci-dessous ne fonctionne pas. J'ai bien intégré mon adresse mail, mais y a t-il d'autres champs à remplir? Je ne m'y connais pas du tout en .php comme vous aurez pu vous en douter !
Quelqu'un pourrait-il regarder et me dire d'où le problème peut-venir ?
Voici le code:
Voici le messag d'erreur:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, postmaster@visba.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Merci d'avance
Mon formulaire de contact ci-dessous ne fonctionne pas. J'ai bien intégré mon adresse mail, mais y a t-il d'autres champs à remplir? Je ne m'y connais pas du tout en .php comme vous aurez pu vous en douter !
Quelqu'un pourrait-il regarder et me dire d'où le problème peut-venir ?
Voici le code:
<?php
$EmailFrom = $_REQUEST['email'];
$EmailTo = "monadresse@gmail.com"; // Your email address here
$Subject = "Contact form";
$Name = Trim(stripslashes($_POST['name']));
$Email = Trim(stripslashes($_POST['email']));
$Message = Trim(stripslashes($_POST['message']));
// validation
$validationOK=true;
if (!$validationOK) {
echo "Error";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= "\n";
$Body .= "\n";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
echo "Succes";
}
else{
echo "Error";
}
?>
Voici le messag d'erreur:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, postmaster@visba.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Merci d'avance