Ragel
03-09-2008, 11:20 PM
Hi Everyone,
I'm not very familiar with PHP but I got this code from a friend and have altered it to make it work for me.
Unfortunately I keep receiving the following error on line 110 no matter what happens to be on line 110 at the time.
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
<?php
$title = $_POST['title'];
$firstname = $_POST['fname'];
$lastname = $_POST['lname'];
$sin = $_POST['sin'];
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$streetnumber = $_POST['streetnum'];
$apptnumber = $_POST['apptnum'];
$streetname = $_POST['streetname'];
$streetdesignation = $_POST['streetdesignation'];
$city = $_POST['city'];
$province = $_POST['province'];
$postal = $_POST['postal'];
$homephone = $_POST['hphone'];
$otherphone = $_POST['ophone'];
$email = $_POST['email'];
$statusres = $_POST['statusres'];
$income = $_POST['income'];
$incomeclass = $_POST['incomeclass'];
$loanamount = $_POST['loanamount'];
$reason = $_POST['reason'];
$debts = $_POST['debts'];
$source = $_POST['source'];
//Co-Applicant
$title2 = $_POST['title2'];
$firstname2 = $_POST['fname2'];
$lastname2 = $_POST['lname2'];
$month2 = $_POST['month2'];
$day2 = $_POST['day2'];
$year2 = $_POST['year2'];
$streetnumber2 = $_POST['streetnum2'];
$apptnumber2 = $_POST['apptnum2'];
$streetname2 = $_POST['streetname2'];
$streetdesignation2 = $_POST['streetdesignation2'];
$city2 = $_POST['city2'];
$province2 = $_POST['province2'];
$postal2 = $_POST['postal2'];
$homephone2 = $_POST['hphone2'];
$otherphone2 = $_POST['ophone2'];
$income2 = $_POST['income2'];
$incomeclass2 = $_POST['incomeclass2'];
$sendTo = "***myemail***";
$subject = "Website Form Submission";
$headers = "From: " . $_POST["title"] ." ". $_POST["fname"]" ". $_POST["lname"]" ". $_POST["email"] . "<" . $_POST["email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = "Name: " . $title . $fname . $lname . "\r\n";
$message .= "SIN: " . $sin . "\r\n";
//$message .= "DOB: " . $month . $day . $year . "\r\n";
$message .= "Street Number: " . $streetnum . "\r\n";
$message .= "Appartment Number: " . $apptnum . "\r\n";
$message .= "Street Name: " . $streetname . "\r\n";
$message .= "Street Designation: " . $streetdesignation . "\r\n";
$message .= "City: " . $city . "\r\n";
$message .= "Province: " . $province . "\r\n";
$message .= "Postal Code: " . $postal . "\r\n";
$message .= "Home Phone: " . $hphone . "\r\n";
$message .= "Other Phone: " . $ophone . "\r\n";
$message .= "E-Mail: " . $email . "\r\n";
$message .= "Residential Status: " . $statusres . "\r\n";
$message .= "Annual Income: " . $income . "\r\n";
$message .= "Income Class: " . $incomeclass . "\r\n";
$message .= "Loan Amount: " . $loanamount . "\r\n";
$message .= "Reason for Loan: " . $reason . "\r\n";
$message .= "Debts: " . $debts . "\r\n";
$message .= "Referral Source: " . $source . "\r\n";
//Co-Applicant
$message .= "Co-Applicant: \r\n";
$message .= "Name: " . $title2 . $fname2 . $lname2 . "\r\n";
$message .= "SIN: " . $sin2 . "\r\n";
$message .= "DOB: " . $month2 . $day2 . $year2 . "\r\n";
$message .= "Street Number: " . $streetnum2 . "\r\n";
$message .= "Appartment Number: " . $apptnum2 . "\r\n";
$message .= "Street Name: " . $streetname2 . "\r\n";
$message .= "Street Designation: " . $streetdesignation2 . "\r\n";
$message .= "City: " . $city2 . "\r\n";
$message .= "Province: " . $province2 . "\r\n";
$message .= "Postal Code: " . $postal2 . "\r\n";
$message .= "Home Phone: " . $hphone2 . "\r\n";
$message .= "Other Phone: " . $ophone2 . "\r\n";
$message .= "Annual Income: " . $income2 . "\r\n";
$message .= "Income Class: " . $incomeclass2 . "\r\n";
$message .= "done--";
mail($sendTo, $subject, $message, $headers);
//output XHTML
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n";
echo "<title>Thank you</title>\n";
echo "\n";
echo "<script type=\"text/javascript\">\n";
echo "function resizeWindow(){\n";
//echo " window.resizeTo(300,300);\n";
echo " window.menubar.visible=false;\n";
echo " window.toolbar.visible=false;\n";
echo " window.locationbar.visible=false;\n";
echo " window.personalbar.visible=false;\n";
echo " window.scrollbars.visible=false;\n";
echo " window.statusbar.visible=false;\n";
echo "}\n";
echo "resizeWindow();\n";
echo "\n";
echo "</script>\n";
echo "\n";
echo "<style type=\"text/css\">\n";
echo "<!--\n";
echo "body {\n";
echo " background-color: #330000;\n";
echo "}\n";
echo ".style1 {\n";
echo " color: #FFFFFF;\n";
echo " font-family: Arial, Helvetica, sans-serif;\n";
echo "}\n";
echo "-->\n";
echo "</style></head>\n";
echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n";
echo "<!--url's used in the movie-->\n";
echo "<!--text used in the movie-->\n";
echo "<!-- saved from url=(0013)about:internet -->\n";
echo "<div align=\"center\">\n";
echo " <p class=\"style1\"> </p>\n";
echo " <p class=\"style1\">Your submission has been received, thank you.</p>\n";
echo " <p class=\"style1\">You may now close this window </p>\n";
echo "</div>\n";
echo "</body>\n";
echo "</html>\n";
echo "\n";
?>
Any help would be greatly appreciated!
I'm not very familiar with PHP but I got this code from a friend and have altered it to make it work for me.
Unfortunately I keep receiving the following error on line 110 no matter what happens to be on line 110 at the time.
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
<?php
$title = $_POST['title'];
$firstname = $_POST['fname'];
$lastname = $_POST['lname'];
$sin = $_POST['sin'];
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$streetnumber = $_POST['streetnum'];
$apptnumber = $_POST['apptnum'];
$streetname = $_POST['streetname'];
$streetdesignation = $_POST['streetdesignation'];
$city = $_POST['city'];
$province = $_POST['province'];
$postal = $_POST['postal'];
$homephone = $_POST['hphone'];
$otherphone = $_POST['ophone'];
$email = $_POST['email'];
$statusres = $_POST['statusres'];
$income = $_POST['income'];
$incomeclass = $_POST['incomeclass'];
$loanamount = $_POST['loanamount'];
$reason = $_POST['reason'];
$debts = $_POST['debts'];
$source = $_POST['source'];
//Co-Applicant
$title2 = $_POST['title2'];
$firstname2 = $_POST['fname2'];
$lastname2 = $_POST['lname2'];
$month2 = $_POST['month2'];
$day2 = $_POST['day2'];
$year2 = $_POST['year2'];
$streetnumber2 = $_POST['streetnum2'];
$apptnumber2 = $_POST['apptnum2'];
$streetname2 = $_POST['streetname2'];
$streetdesignation2 = $_POST['streetdesignation2'];
$city2 = $_POST['city2'];
$province2 = $_POST['province2'];
$postal2 = $_POST['postal2'];
$homephone2 = $_POST['hphone2'];
$otherphone2 = $_POST['ophone2'];
$income2 = $_POST['income2'];
$incomeclass2 = $_POST['incomeclass2'];
$sendTo = "***myemail***";
$subject = "Website Form Submission";
$headers = "From: " . $_POST["title"] ." ". $_POST["fname"]" ". $_POST["lname"]" ". $_POST["email"] . "<" . $_POST["email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = "Name: " . $title . $fname . $lname . "\r\n";
$message .= "SIN: " . $sin . "\r\n";
//$message .= "DOB: " . $month . $day . $year . "\r\n";
$message .= "Street Number: " . $streetnum . "\r\n";
$message .= "Appartment Number: " . $apptnum . "\r\n";
$message .= "Street Name: " . $streetname . "\r\n";
$message .= "Street Designation: " . $streetdesignation . "\r\n";
$message .= "City: " . $city . "\r\n";
$message .= "Province: " . $province . "\r\n";
$message .= "Postal Code: " . $postal . "\r\n";
$message .= "Home Phone: " . $hphone . "\r\n";
$message .= "Other Phone: " . $ophone . "\r\n";
$message .= "E-Mail: " . $email . "\r\n";
$message .= "Residential Status: " . $statusres . "\r\n";
$message .= "Annual Income: " . $income . "\r\n";
$message .= "Income Class: " . $incomeclass . "\r\n";
$message .= "Loan Amount: " . $loanamount . "\r\n";
$message .= "Reason for Loan: " . $reason . "\r\n";
$message .= "Debts: " . $debts . "\r\n";
$message .= "Referral Source: " . $source . "\r\n";
//Co-Applicant
$message .= "Co-Applicant: \r\n";
$message .= "Name: " . $title2 . $fname2 . $lname2 . "\r\n";
$message .= "SIN: " . $sin2 . "\r\n";
$message .= "DOB: " . $month2 . $day2 . $year2 . "\r\n";
$message .= "Street Number: " . $streetnum2 . "\r\n";
$message .= "Appartment Number: " . $apptnum2 . "\r\n";
$message .= "Street Name: " . $streetname2 . "\r\n";
$message .= "Street Designation: " . $streetdesignation2 . "\r\n";
$message .= "City: " . $city2 . "\r\n";
$message .= "Province: " . $province2 . "\r\n";
$message .= "Postal Code: " . $postal2 . "\r\n";
$message .= "Home Phone: " . $hphone2 . "\r\n";
$message .= "Other Phone: " . $ophone2 . "\r\n";
$message .= "Annual Income: " . $income2 . "\r\n";
$message .= "Income Class: " . $incomeclass2 . "\r\n";
$message .= "done--";
mail($sendTo, $subject, $message, $headers);
//output XHTML
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n";
echo "<title>Thank you</title>\n";
echo "\n";
echo "<script type=\"text/javascript\">\n";
echo "function resizeWindow(){\n";
//echo " window.resizeTo(300,300);\n";
echo " window.menubar.visible=false;\n";
echo " window.toolbar.visible=false;\n";
echo " window.locationbar.visible=false;\n";
echo " window.personalbar.visible=false;\n";
echo " window.scrollbars.visible=false;\n";
echo " window.statusbar.visible=false;\n";
echo "}\n";
echo "resizeWindow();\n";
echo "\n";
echo "</script>\n";
echo "\n";
echo "<style type=\"text/css\">\n";
echo "<!--\n";
echo "body {\n";
echo " background-color: #330000;\n";
echo "}\n";
echo ".style1 {\n";
echo " color: #FFFFFF;\n";
echo " font-family: Arial, Helvetica, sans-serif;\n";
echo "}\n";
echo "-->\n";
echo "</style></head>\n";
echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n";
echo "<!--url's used in the movie-->\n";
echo "<!--text used in the movie-->\n";
echo "<!-- saved from url=(0013)about:internet -->\n";
echo "<div align=\"center\">\n";
echo " <p class=\"style1\"> </p>\n";
echo " <p class=\"style1\">Your submission has been received, thank you.</p>\n";
echo " <p class=\"style1\">You may now close this window </p>\n";
echo "</div>\n";
echo "</body>\n";
echo "</html>\n";
echo "\n";
?>
Any help would be greatly appreciated!