Forum Moderators: coopster

Message Too Old, No Replies

PHP Parse Error

Trouble with Parse errors in PHP

         

tylivia

5:51 am on Aug 28, 2007 (gmt 0)

10+ Year Member



I am having the following error:

Parse error: parse error, unexpected T_VARIABLE in /home/tyliviaw/public_html/kramms/admit_app_process.php on line 206

I am banging my head off the wall trying to figure out where I went wrong. I simply tested the script halfway finishing the output variables.

Below is the code: I have marked line 206

<?php

//address error handling

ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_Notice);

//create variable shortcuts

$location = $_POST["location"];
$applicant_name = $_POST["applicant_name"];
$Sex = $_POST["Sex"];
$address = $_POST["address"];
$city = $_POST['city'];
$county = $_POST["county"];
$state = $_POST["state"];
$zip = $_POST["zip"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$dob = $_POST["dob"];
$birthplace = $_POST["birthplace"];
$prev_occupation = $_POST["prev_occupation"];
$Veteran = $_POST["Veteran"];
$vet_widow = $_POST["vet_widow"];
$marital_status = $_POST["marital_status"];
$anniversary = $_POST["anniversary"];
$name_spouse = $_POST["name_spouse"];
$dod = $_POST["dod"];
$address_spouse = $_POST["address_spouse"];
$city_spouse = $_POST["city_spouse"];
$state_spouse = $_POST["state_spouse"];
$zip_spouse = $_POST["czip_spouse"];
$phone_spouse = $_POST["phone_spouse"];
$spouse_employed = $_POST["spouse_employed"];
$address_employer = $_POST["address_employer"];
$city_employer = $_POST["city_employer"];
$state_employer = $_POST["state_employer"];
$zip_employer = $_POST["zip_employer"];
$phone_employer = $_POST["phone_employer"];
$relative1 = $_POST["relative1"];
$relative2 = $_POST["relative2"];
$relative3 = $_POST["relative3"];
$POA = $_POST["POA"];
$legal_guardian = $_POST["legal_guardian"];
$name_poa_guardian = $_POST["name_poa_guardian"];
$religion = $_POST["religion"];
$name_pastor = $_POST["name_pastor"];
$name_church = $_POST["name_church"];
$address_church = $_POST["caddress_church"];
$name_physician = $_POST["cname_physician"];
$address_physician = $_POST["address_physician"];
$phone_physician = $_POST["phone_physician"];
$hospital_preference = $_POST["hospital_preference"];
$funeral_director = $_POST["funeral_director"];
$address_funeral = $_POST["address_funeral"];
$phone_funeral = $_POST["phone_funeral"];
$ssn = $_POST["ssn"];
$number_medicare = $_POST["number_medicare"];
$bcid = $_POST["bcid"];
$bcpn = $_POST["bcpn"];
$bcgn = $_POST["bcgn"];
$sixtyfivespecial = $_POST["65special"];
$securitysixtyfiveplan = $_POST["security65plan"];
$blue_shield = $_POST["blue_shield"];
$name_company1 = $_POST["name_company1"];
$address_company1 = $_POST["address_company1"];
$number_contract1 = $_POST["number_contract1"];
$name_company2 = $_POST["name_company2"];
$address_company2 = $_POST["address_company2"];
$number_contract2 = $_POST["number_contract2"];
$medrights_to_provider = $_POST["medrights_to_provider"];
$name_provider = $_POST["name_provider"];
$med_conditions = $_POST["med_conditions"];
$name_hospital = $_POST["name_hospital"];
$date_hospital = $_POST["date_hospital"];
$name_nursing = $_POST["name_nursing"];
$dates_nursing = $_POST["dates_nursing"];
$value_realestate_self = $_POST["value_realestate_self"];
$value_realestate_joint = $_POST["value_realestate_joint"];
$balance_checking_self = $_POST["balance_checking_self"];
$balance_checking_joint = $_POST["balance_checking_joint"];
$balance_savings_self = $_POST["balance_savings_self"];
$balance_savings_joint = $_POST["balance_savings_joint"];
$balance_cash_self = $_POST["balance_cash_self"];
$balance_cash_joint = $_POST["balance_cash_joint"];
$value_surender_self = $_POST["value_surender_self"];
$value_surrender_joint = $_POST["value_surrender_joint"];
$value_stocks_self = $_POST["value_stocks_self"];
$value_stocks_joint = $_POST["value_stocks_joint"];
$value_bonds_self = $_POST["value_bonds_self"];
$value_bonds_joint = $_POST["value_bonds_joint"];
$assets_overfive_self = $_POST["assets_overfive_self"];
$assets_overfive_joint = $_POST["assets_overfive_joint"];

$assets_total_self = $_POST["comments"];
$assets_total_joint = $_POST["comments"];
$income_savings_self = $_POST["comments"];
$income_savings_joint = $_POST["comments"];
$amount_checking_self = $_POST["comments"];
$amount_checking_joint = $_POST["comments"];
$cod_self = $_POST["comments"];
$cod_joint = $_POST["comments"];
$trusts_self = $_POST["comments"];
$trusts_joint = $_POST["comments"];
$benefits_ss_self = $_POST["comments"];
$benefits_ss_joint = $_POST["comments"];
$pension_self = $_POST["comments"];
$pension_joint = $_POST["comments"];
$dividends_self = $_POST["comments"];
$dividends_joint = $_POST["comments"];
$other_income_self = $_POST["comments"];
$other_income_joint = $_POST["comments"];
$funeral_home = $_POST["comments"];
$funeral_amount_self = $_POST["comments"];
$funeral_amount_joint = $_POST["comments"];
$funeral_total = $_POST["comments"];
$property_transfer = $_POST["comments"];
$sig = $_POST["comments"];
$sig_date = $_POST["comments"];
$name_prox = $_POST["comments"];
$address_prox = $_POST["comments"];
$city_prox = $_POST["comments"];
$state_prox = $_POST["comments"];
$zip_prox = $_POST["comments"];
$phone_prox = $_POST["comments"];
$date_prox = $_POST["comments"];

//below is the info sent to Kramm's email addresses. S

$to = "mail@example.com";
$subject = "Kramm Healthcare Contact Page";
$headers = "From: $email\n";

// below is the message body sent to Kramms email

$message = "A visitor to your Admission Page has sent the following Application For Admission.\n
Applying to: $location
Applicant Name: $applicant_name
Sex: $Sex
Address: $address
City: $city
County: $county
State: $state
Zip: $zip
Phone Number: $phone
Email Address: $email
Date of Birth: $dob
Birthplace: $birthplace
Previous Occupation: prev_occupation
Veteran?: $Veteran
Veteran's Widow?: $vet_widow
Marital Status: $marital_status
Anniversay Date: $anniversary
Spouse Name: $name_spouse
If deceased, Date of Death: $dod
Address of Living Spouse: $address_spouse
City: $city_spouse
State: $state_spouse
Zip: $zip_spouse
Spouse Phone Number: $phone_spouse
Spouse Employed?: $spouse_employed
Spouse's Employer Address: $address_employer
City: $city_employer
State: $state_employer
Zip: $zip_employer
Phone Number: $phone_employer
Below is a list of Relatives, Children or responsible persons
$relative1
$relative2
$relative3
Applicant have a POA?: $POA
Applicant have a Legal Guardian?: $legal_guardian
Name of Legal Guardian: $name_poa_guardian
Religion: $religion
Pastor's Name: $name_pastor
Church Name: $name_church
Address: $address_church
Name of Family Physician: $name_physician
Address: $address_physician
Physician Phone Number: $phone_physician
Hospital Preference: $hospital_preference
Funeral Director: $funeral_director
Address: $address_funeral
Phone Number: $phone_funeral
Applicant SSN: $ssn
Medicare Number: $number_medicare
Blue Cross ID: $bcid

;

//Below are the variables to output to the browser and the user's email address

LINE 206 $member = "$applicant_name";
$user = "$email";
$usersubject = "Thank You from Kramms Healthcare and Nursing Home";
$userheaders = "From: mail@example.com\n";
$title = "Kramms Health Care and Nursing Home";

$usermessage = "Dear $name <br><br>Thank you for submitting your information with Kramm Healthcare Center and Nursing Home. We will respond to your inquiry as soon as possible.";

//below is the mail function and variables to include

mail($to,$subject,$message,$headers);

mail($user,$usersubject,$usermessage,$userheaders);

//adjust for magic quotes and stripping html tags in the comments text area

$comments=stripslashes ($comments);
$comments=htmlentities ($comments);
$comments=strip_tags ($comments);

//success text that is output to browser on the success page

echo "Below is the information you submitted to us.";?>
<br /><p>If this is wrong please <a href="javascript:history.go(-1)">go back</a> and correct your information.</p><hr />
<?php
echo "Applying to: $location<br>
Applicant Name: $applicant_name<br>
Sex: $Sex<br>
Address: $address<br>
City: $city<br>
County: $county<br>
State: $state<br>
Zip: $zip<br>
Phone Number: $phone<br>
Email Address: $email<br>
Date of Birth: $dob<br>
Birthplace: $birthplace<br>
Previous Occupation: prev_occupation<br>
Veteran?: $Veteran<br>
Veterans Widow?: $vet_widow<br>
Marital Status: $marital_status<br>
Anniversay Date: $anniversary<br>
Spouse Name: $name_spouse<br>
If deceased, Date of Death: $dod<br>
Address of Living Spouse: $address_spouse<br>
City: $city_spouse<br>
State: $state_spouse<br>
Zip: $zip_spouse<br>
Spouse Phone Number: $phone_spouse<br>
Spouse Employed?: $spouse_employed<br>
Spouses Employer Address: $address_employer<br>
City: $city_employer<br>
State: $state_employer<br>
Zip: $zip_employer<br>
Phone Number: $phone_employer<br>
Below is a list of Relatives, Children or responsible persons<br>
$relative1<br>
$relative2<br>
$relative3<br>
Applicant have a POA?: $POA<br>
Applicant have a Legal Guardian?: $legal_guardian<br>
Name of Legal Guardian: $name_poa_guardian<br>
Religion: $religion<br>
Pastors Name: $name_pastor<br>
Church Name: $name_church<br>
Address: $address_church<br>
Name of Family Physician: $name_physician<br>
Address: $address_physician<br>
Physician Phone Number: $phone_physician<br>
Hospital Preference: $hospital_preference<br>
Funeral Director: $funeral_director<br>
Address: $address_funeral<br>
Phone Number: $phone_funeral<br>
Applicant SSN: $ssn<br>
Medicare Number: $number_medicare<br>
Blue Cross ID: $bcid";
?>

[edited by: eelixduppy at 3:05 am (utc) on Aug. 29, 2007]
[edit reason] removed specifics [/edit]

dreamcatcher

6:33 am on Aug 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi tylivia,

Welcome to WebmasterWorld. :)

The reason for your error is you aren`t closing your $message variable with a quote. In PHP the error can sometimes be on the previous line to the one it gives you.

So change:
Blue Cross ID: $bcid

To:
Blue Cross ID: $bcid"

dc

tylivia

1:43 am on Aug 29, 2007 (gmt 0)

10+ Year Member



Dreamcatcher,

Thank you so much!

I was coding this last night...late...and for the life of me just could not process the error...and what it could be.

Thanks again, for the quick reply. Now I know where to go for help. This place is faster than our Help Desk! :)

Best Regards,

Harry

dreamcatcher

6:47 am on Aug 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No problem Harry, sometimes 2 sets of eyes are better than one.

dc