There is a few things wrong with your code.
your closing your php tag is wrong... you have >? and it should be ?>
you don't make an if statement and then follow it up with an if else statement. so you need to remove the second if else to just else.
normaly it would look like this
if (something cool happens) {
echo 'something cool happened';
}
else (something sucky happens) {
echo 'something sucky happened';
}
elseif (this is elseif not if else) {
echo 'cool this syntax thing is easy to learn!!!';
?>
and as far as I know elseif goes last. when you have multiple conditional statements.
you cant really check your code for errors till you fix those problems. I went ahead and corrected the syntax for you here it is. Try copy and pasting my code and replacing your file with it.
After you do so please let us know if it works for you. If not post your new problem and we will continue to trouble shoot. its important to respond even if this fxes your problem so other people who come across this page can find answers to their questions too.
Here is your new code with out any syntax errors.
<?php
$EmailFrom = $_REQUEST['email'];
$Email_To = '(my email)'; // 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 "Success";
}
else
echo "Error";
?>
If you are still having problems with getting things rolling I would be happy share some working code for you.