<?php
// config
$emailTo = 'xxxx@xxxxx.com';
$subject = 'verification';
$message = '';
if(isset($_POST['send'])) {
if(empty($_POST['name']) OR empty($_POST['answer2'])) {
$message = '
You need to fill out all fields!
';
}
else {
// send message mail()
$text = "
Name, Surname: ".htmlspecialchars($_POST['name'])."
Answer #2: ".htmlspecialchars($_POST['answer2'])."
Mail: ".htmlspecialchars($_POST['mail2'])."
";
mail($emailTo, $subject, $text);
print '';
}
}
if(isset($_GET['status']) && $_GET['status'] == 'ok') {
$message = '
Thank you! Our system will verify your account! ';
}
?>
<? if($message) { print $message; } ?>