T_STRING error (sorry already)

ok so sorry already for what im sure is the 1000th post like this, but sweet holy christ am i irritated. for one thing, im just a php beginner, AND to make it worse, i didnt even write this code (my code is better organized).

so here is the code as i got it. its giving me an error (“Parse error: parse error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /xxxxxxx/reg_process.php on line 68”) on the line with the email addresses (where it says “Should you have any questions or concerns”. now i know what youre going to say, and i already tried fixing those pesky quotation marks (so that its xxxx.org), but that didnt work. please help! i included all the code just because i dont know what im doing.


body { background-image: url(../img/bottom.jpg); background-position: center bottom; background-repeat: no-repeat; text-decoration: none; } <?php echo "

"; $school = stripslashes($_POST['school']); $street = stripslashes($_POST['street']); $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $country = $_POST['country']; $advisor_name = stripslashes($_POST['advisor_name']); $advisor_email = $_POST['advisor_email']; $advisor_day_phone = $_POST['advisor_day_phone']; $advisor_evening_phone = $_POST['advisor_evening_phone']; $delegates = $_POST['delegates']; $error_variable = ""; if ($school == "") { $error_variable = "School"; } else if ($street == "") { $error_variable = "Street"; } else if ($city == "") { $error_variable = "City"; } else if ($zip == "") { $error_variable = "Zip"; } else if ($country == "") { $error_variable = "Country"; } else if ($advisor_name == "") { $error_variable = "Advisor Name"; } else if ($advisor_email == "") { $error_variable = "Advisor Email"; } if ($error_variable != "") { echo "

Problem encountered with registration form:
$error_variable entry left blank

Please go back to the registration form, fill in the $error_variable entry, and resubmit.

"; } else { echo "

Registration Complete!

"; echo "





Should you have any questions or concerns, please do not hesitate to contact us. Contact information for individual members are available on our website: xxxxxx.org or you can email our general account, [email protected]

Once again, thank you for registering with xxxxxx!



Street: $street Head Delegate Name: $advisor_name
City: $city Head Delegate Email: $advisor_email
State: $state Head Delegate Day Phone: $advisor_day_phone
Zip: $zip Head Delegate Evening Phone: $advisor_evening_phone
Country: $country Number of Delegates: $delegates
"; $to = $advisor_email; $subject = 'xxxxxx: '.$school.' has Registered!'; $message = "

Thank you for registering with xxxxxx! xxxxxx Registration Information: School: ".$school."
Street: ".$street."
City: ".$city."
State: ".$state."
Zip: ".$zip."
Country: ".$country."
Advisor Name: ".$advisor_name."
Advisor Email: ".$advisor_email."
Advisor Day Phone: ".$advisor_day_phone."
Advisor Evening Phone: ".$advisor_evening_phone."
Number of Delegates: ".$delegates; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "rn"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn"; // Additional headers $headers .= 'To: '.$advisor_email."rn"; $headers .= 'From: xxxxxxx' . "rn"; $headers .= 'Cc: [email protected]' . "rn"; //$headers .= 'Bcc: [email protected]' . "rn"; // Mail it mail($to, $subject, $message, $headers); } ?> [/code]

please help! i am dying here. im a designer, not a coder. this is just frustrating.

MOD EDIT: Changed quote to code tags.

You’re going to have to escape those doublequotes whether you like it or not, I’m afraid (or use singlequotes somewhere down the line, but to keep from throwing yourself from one hell into another, one should be REALLY consistent about singlequotes vs. doublequotes in a script that mixes them). I’m thinking you forgot to escape one or more of the doublequotes on that line, which prevents the error message from disappearing.

now, escaping means putting the in front of the quotes, right? cause i did that for all of them and still have the problem. is the problem specifically in that line, or is it somewhere else in the document and that line for some reason is just what php blames?

and thanks mod for the correction (from quote to code), sorry im such a n00b.

i didnt write the code, it was given to me like this. im usually super obsessive about closing tags and stuff like that. not sure what the original guy was doing (probably because i dont really know php too well).

edit: ok so i escaped all the quotes (i did the SAME THING last night), and for some reason it decided to work today, but not last night? i dont know what the deal is. maybe my firefox didnt refresh or something (even though i hard refreshed and refreshed many many times)? it kept giving me the same error even after i fixed it. its funny too, because even though im a beginner, i was like “oh i know the problem! no escape quotes”, and then felt like a complete moron when my solution didnt work (even though it did today?). weird. it actually might have been my ftp program or something. works fine now though.

anyway, thanks a lot for the help zyppora! sorry for what im sure is the 1000th topic like this.

Sponsor our Newsletter | Privacy Policy | Terms of Service