here is the php code that is in an html form and whenever i run it i get this error: Parse error: syntax error, unexpected variable "$body" in C:\Users\LUNIV\LUNIVII\index.php on line 15
<?php
$message_sent = false;
if(isset($_POST['lname']) && $_POST['lname'] != ''){
if(filter_var($_POST['lname'], FILTER_VALIDATE_EMAIL)){
echo "<pre>";
print_r($_POST);
echo "<pre>";
$name = $_POST['fname'];
$email = $_POST['lname'];
$story = $_POST['story'];
$email_to = "lunivii@outlook.com";
$body = "";
$body .= "From: ". $name. "\r\n";
$body .= "Email: ". $email. "\r\n";
$body .= "Message: ". $story. "\r\n";
mail($email_to,$email,$story);
$message_sent = true;
}
}
?>