I am gettin a error message on this script can someone help me. I can't see what is wrong. Thanks in advance for any help you can give me.
here is the error and code.
Parse error: syntax error, unexpected T_VARIABLE in /home/a4284579/public_html/contactformphp.php on line 27 - <?php
-
-
/* Subject and Email Variables*/
-
-
$emailSubject = 'Client Information Scripting!';
-
$webMaster = 'gravizdesign@live.com';
-
-
/*Gathering Data Variables*/
-
-
$emailField = $_POST['email'];
-
$nameField = $_POST['name'];
-
$messageField = $_POST['message'];
-
-
$body = <<<EOD
-
<br><hr><br>
-
Email: $email<br>
-
Name: $name<br>
-
Message: $message<br>
-
EOD;
-
-
$headers = "From: $email\r\n";
-
$headers .= "Content-type: text/html\r\n";
-
$success = mail($webMaster, $emailSubject, $body, $headers
-
-
/* Results rendered as HTML */
-
-
$theResults = <<<EOD
-
<html>
-
<head>
-
<title>Thesiscomplete.ie - Thesis bounding made easy</title>
-
<meta http-equiv="refresh" content"5;URL=http://thesiscomplete.ie/contactus.html">
-
<style type="text/css">
-
<!--
-
body {
-
background-color: #444;
-
font-family: Verdana, Arial, Helvetica, sans-serif;
-
font-size: 16px;
-
font-style: normal;
-
line-height: normal;
-
font-weight: normal;
-
color: #fec001;
-
text-decoration: none;
-
padding-top: 200px;
-
margin-left: 200px
-
width: 800px
-
}
-
-->
-
</style>
-
</head>
-
-
<div>
-
<div align="centre">Your email will be answered as soon as possible. You will be returned to Thesiscomplete in a few seconds!</div>
-
</body>
-
</html>
-
EOD;
-
echo "$theResults";
-
-
?>
4 3305 code green 1,726
Recognized Expert Top Contributor
It means there is a syntax error on line 27 (or possibly earlier).
Enclose in CODE tags and tell us which is line 27
line 27 is the following $theResults = <<<EOD
code green 1,726
Recognized Expert Top Contributor
The error is on this line - $success = mail($webMaster, $emailSubject, $body, $headers
-
Atli 5,058
Recognized Expert Expert
There also seem to be spaces following the "<<<EOD" on the line you indicated. You need to remove them. - Nothing can follow the starting delimiter of an Heredoc string. Not until the next line, that is.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ehartwig |
last post by:
I recently created a script for user verification, solved my emailing
issues, and then re-created the script in order to work well with the
new PHP 5 that I installed on my server. After...
|
by: aamer |
last post by:
can anyone please help me, im getting a dumb:
Parse error: syntax error, unexpected T_VARIABLE in /home/jeddah/public_html/lomar/cart/remove.php on line 5
in the following file,
<?php...
|
by: bovanshi |
last post by:
got this annoying error
I'm completly new to php... and i have no clue what is wrong here, from what i can tell there is nothing rong with this code... but that isn't what the borwser say :P
...
|
by: epots9 |
last post by:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/xxx.php on line xxx
I get that message when i try to run my...
|
by: mdouble |
last post by:
I'm a complete novice with HTML and PHP. Recently I purchased an auto responder that requires me to edit a PHP file during the installation process as per directions provided in a read me file.
...
| |
by: SilvaZodiac |
last post by:
Hi everyone,
I'm still rather new to PHP code, and I have a syntax error. I've tried several different solutions, but it won't fix. It seems to suggest that I need a new bracket somewhere in the...
|
by: needhelp08 |
last post by:
I am getting the error Parse error: syntax error, unexpected T_VARIABLE on line 4 but I can't seem to find what is wrong. Could someone please help.
<?php
$conn = @mysql_connect("localhost",...
|
by: praclarush |
last post by:
I've just started php, and this is a class assignment, but my question is I’m getting this error PHP Parse error: syntax error, unexpected T_IF, expecting T_VARIABLE or '$' in...
|
by: Lawrence Krubner |
last post by:
Imagine a template system that works by getting a file, as a string, and
then putting it through eval(), something like this:
$formAsString = $controller->command("readFileAndReturnString",...
|
by: fburn |
last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux.
I receive an error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |