Jump to content

Cant Find Error But there is one apparently, PLEASE HELP


ch8dy2

Recommended Posts

This code is for my websites email form. Have checked all ID's for Caps etc all labels and names are exactly the same yet when i open it after putting it in my host directory and viewing the page i am greeted by this

 

"Parse error: syntax error, unexpected '{' in /home/a5577622/public_html/contactformprocess.php on line 25"

 

Here is the code Guys.(contactformprocess is the saved title of the doc and i have removed the email address for displaying it on here, anything to reduce spammers.)

 

<?php

/* Subject and email variables */

$emailSubject = 'contactformprocess!';
$webMaster = '';

/* Gathering data variables */

$nameField = $_POST['name'];
$telephoneField = $_POST['telephone'];
$optionField = $_POST['option'];
$commentsField = $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Email: $name <br>
Telephone: $telephone <br>
Option: $option <br>
$comments: $comments <br>
EOD;

$headers = "From: $name\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail {$webMaster, $emailSubject, $body, $headers};

$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Message Sent</title>
</head>

<body>
<div align="center">
  <p><strong>Thank you for your interest! Your email will be answered very soon
  </strong></p>
  <p>You shall be returned to the previous page in just a few soconds</p>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

 

 

 

 

Please help guys, any comments or thoughts a re appreciated.

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.