This is a contact form php script which i got from some site. But when i uploaded to site, it shows " parse syntax error" . Its somewhere between line 30 to 35. Please review it and find ou the error.
<?php
$EmailFrom = "contact@test.com";
$EmailTo = "root@localhost";
$Subject = "Contact Form";
$Name = $_POST;
$Email = $_POST;
$Phone = $_POST;
$Comments = $_POST;
// The body text of your email
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "
";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "
";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "
";
$Body .= "Comments: ";
$Body .= $Comments;
$Body .= "
";
// command that calls the php mail() function
$result = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirection as a function of $result variable boolean value
if ($result){
print "<meta http-equiv="refresh" content="0;URL=messagesent.html">";
}
else{
print "<meta http-equiv="refresh" content="0;URL=messagenotsent.html">";
}
?>