Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.