ebryant77 Posted January 31, 2010 Share Posted January 31, 2010 Please help! I can't find the error that this refers to: Parse error: syntax error, unexpected T_STRING in /u/vp/cleanairlawncare.com/www/opp2010.php on line 113 Any help is appreciated greatly! <?php // Field Mapping $sFirstName = $_POST["txtFirstName"]; $sLastName = $_POST["txtLastName"]; $sEmailAddress = $_POST["txtEmailAddress"]; $sPhoneNumber = $_POST["txtPhoneNumber"]; $sCity = $_POST["txtCity"]; $sState = $_POST["selState"]; $sOwnCity = $_POST["txtOwnCity"]; $sOwnState = $_POST["selOwnState"]; $sWhy = $_POST["txtWhy"]; $sView = $_POST["txtView"]; $sBusiness = $_POST["txtBusiness"]; $sDescribe = $_POST["txtDescribe"]; $sDeserve = $_POST["txtDeserve"]; $sfindout = $_POST["txtfindout"]; $sTerms = $_POST["Terms"]; if (($sFirstName == "") || ($sLastName == "") || ($sEmailAddress == "") || ($sPhoneNumber == "") || ($sCity == "") || ($sState == "") || ($sOwnCity == "") || ($sOwnState == "") || ($sWhy == "") || ($sView == "") || ($sBusiness == "") || ($sDescribe == "") || ($sDeserve == "") || ($sfindout == "") || ($sTerms == "")) { print('<span style="color:#ffffff; font-size:14px; font-family:Arial, Helvetica, sans-serif">Please complete the Form. Make sure you have read the Terms and Conditions! <a style="color:#ffffff" href="javascript:history.go(-1)">Click here to go back</a></span>'); } else { $sMailFrom = 'opp2010@cleanairlawncare.com'; $sMailTo = 'opp2010@cleanairlawncare.com'; $sMailSubject = 'Clean Air Lawn Care Opportunity 2010'; $sMailBody = '<p>Clean Air Lawn Care - Opportunity 2010</p> First Name: <b>' . $sFirstName . '</b><br /> Last Name: <b>' . $sLastName . '</b><br /> Email Address: <b>' . $sEmailAddress . '</b><br /> Phone Number: <b>' . $sPhoneNumber . '</b><br /> City: <b>' . $sCity . '</b><br /> State: <b>' . $sState . '</b><br /> Franchise City: <b>' . $sOwnCity . '</b><br /> Franchise State: <b>' . $sOwnState . '</b><br /> Why do you want it: ' . $sWhy . '<br /> View on Sustainability: ' . $sView . '<br /> Business Experience: ' . $sBusiness . '<br /> Describe Yourself: ' . $sDescribe . '<br /> Why Deserving: ' . $sDeserve . '<br /> How did you hear about it: ' . $sfindout . '<br />; $sMailHeaders = "From: $sMailFrom\n"; $sMailHeaders .= "Content-Type: text/html; charset=iso-8859-1\r\n"; if (mail($sMailTo, $sMailSubject, $sMailBody, $sMailHeaders)) { print('<span style="color:#CCFFFF; font-size:14px; font-family:Arial, Helvetica, sans-serif"><div align="center"><br /><br />Thank you, your entry has been submitted!</div></span>'); } else { print('<span style="color:#CCFFFF; font-size:14px; font-family:Arial, Helvetica, sans-serif"><div align="center"><br /><br />Could not send entry, please contact the webmaster!</div></span>'); } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/190468-problem-with-code-unexpected-t_string-please-help/ Share on other sites More sharing options...
KevinM1 Posted January 31, 2010 Share Posted January 31, 2010 You're missing a " at the end of the string you assign to $sMailBody Quote Link to comment https://forums.phpfreaks.com/topic/190468-problem-with-code-unexpected-t_string-please-help/#findComment-1004682 Share on other sites More sharing options...
ebryant77 Posted January 31, 2010 Author Share Posted January 31, 2010 THANK YOU!!! Quote Link to comment https://forums.phpfreaks.com/topic/190468-problem-with-code-unexpected-t_string-please-help/#findComment-1004687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.