473,387 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING..

Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/78/5927878/html/contactform.php on line 15

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.         echo $_POST['firstname'];
  4.  
  5.         $to = "****@****.com";
  6.         $bcc = "****@****.net";
  7.         $subject = "Email Subscription Form";
  8.         $headers = "From: $email\r\n" . 
  9.             "Bcc: $bcc\r\n" . 
  10.             "Content-Type: text/html";
  11.  
  12.         echo $_POST['firstname'];
  13.  
  14.         $strHtml = "<font face=Arial size=1><table width=450 border=1>" .
  15.         "<tr><td>Full Name</td><td> $_POST['fullname'] </td></tr>" .
  16.         "<tr><td>Email Address</td><td> $_POST['email'] </td></tr>" .
  17.         "<tr><td>Telephone</td><td> $_POST['telephone'] </td></tr>" .
  18.         "<tr><td>Industry</td><td> $_POST['industry'] </td></tr>" .
  19.         "<tr><td>Job Title</td><td> $_POST['jobtitle'] </td></tr>" .
  20.         "<tr><td>Country</td><td> $_POST['country'] </td></tr>" .
  21.         "</table></font>";
  22.  
  23.         if (mail($to, $subject, $strHtml, $headers))
  24.         {
  25.             echo("<script>
  26.             <!--
  27.                 location.replace(\"thanks.html\");
  28.             -->
  29.             </script>" );
  30.         } 
  31. ?>
Dec 30 '12 #1
2 2777
Rabbit
12,516 Expert Mod 8TB
I don't know if this is the issue but when you want to resolve arrays in strings, you don't need to put quotes around the index.
Dec 31 '12 #2
Dormilich
8,658 Expert Mod 8TB
or rather, if you use quoted keys, you need to enclose the whole variable in curly braces. see PHP’s String section for detailed information.
Dec 31 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: choste11 | last post by:
I just installed VB.NET on a PC running Windows XP. The install went fine, but when I start a new project and try and open form1.vb by either double clicking it or right click, View Desginer, I get...
2
by: Sara T. | last post by:
I always found that web page written by ASP.NET (VB.NET) generate error when starting at the first times. If I click refresh button on the IE again, it can work as well. What's wrong ? Again...
2
by: Luke | last post by:
Hi I have the following code which is an ASP questionnaire using an Access database. (I am using access as I have no choice!). Basically there is an html form which submits the form to the page...
2
by: weetat.yeo | last post by:
Hi all , I have a form that allow user to enter description , sometimes the description value have html special character for example %20 and etc. Inserting into the mysql database is ok , for...
1
by: monudjn | last post by:
Hi I am implementing ajax in portal. Using ajax i am able to updating the content of portlets asynchronously. However i am facing a problem The Problem: While submitting the form i am getting...
1
by: Bob | last post by:
Hi all, I've created a database at work and have copied it to home but have had some problems when I try to open the main form. The error when I run it is: Compile error: Can't find project...
3
by: svsenthilkumar | last post by:
hai , i got an error in javascript, when upload a file in a form, the code is working properly in IE but i got javascript error in Mozilla firefos what is mean by error and how to rectify...
0
acoder
by: acoder | last post by:
Problem When setting the FORM object's action property an "Object does not support this property or method" error occurs Browser Internet Explorer 6- Example The Javascript code: var...
2
DonRayner
by: DonRayner | last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm...
1
by: Ryan Swaby | last post by:
I have an access form that is bound to an ado recordset using the following code in the form open event. Dim cn As ADODB.Connection Dim rs As ADODB.Recordset 'Use the ADO...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
jinu1996
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.