This repository has been archived on 2020-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
nemubot-askweb/questions.php
Bertrand Cournaud 6ba639e01d Eamil
2012-05-21 17:33:12 +02:00

34 lines
677 B
PHP
Executable File

<?php
define("FILENAME", "questions_file.nemubot");
if (isset ($_POST['send']))
{
if (empty($_POST['question']) || empty($_POST['answer']))
{
echo "Il manque la question ou la réponse !";
}
else
{
$question = $_POST['question'];
$answer = $_POST['answer'];
echo 'La question est : ' . $question . "<br/>";
echo 'La réponse est : ' . $answer;
$to = "bertrand.cournaud@gmail.com";
$subject = "Nemubot";
$message = "Ceci est un test";
$headers = "From: bertrand.cournaud@gmail.com";
if (mail($to, $subject, $message, $headers))
{
echo ("Email sent");
}
else
echo ("Error with the email");
}
}
?>