Jump to content

Parse error: syntax error, unexpected $end in /home1/user/public_html...


nickfran

Recommended Posts

Hey Everyone,

I'm getting this error when I submit my contact form.

Parse error: syntax error, unexpected $end in /home1/user/public_html/contact/process.php on line 22

 

I got this code from a video on youtube.

If I made a mistake or TYPO please let me know. Thanks!

 

Here's my code:

 

<?php
$emailSubject = 'Contact Form Submission';
$sendto = '[email protected]';

$nameField = $_Post['name'];
$emilField = $_Post['email'];
$phoneField = $_Post['phone'];
$SubjectField = $_Post['subject'];
$messageField = $_Post['message'];
$body = <<<EOD
<br><hl><br>This Form was submitted from the Domain.com contact page.<br>
Name: $name<br>
E-Mail: $email<br>
Phone: $phone<br>
Subject: $subject<br>
Message: $message<br>
BOD;

$headers = "FROM: $email\r\n";
$headers .="Content-Type: text/html\r\n";
$success = mail($sendto, $emailSubject, $body, $headers);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.