Forum Moderators: coopster

Message Too Old, No Replies

Parse error: parse error, unexpected T_VARIABLE error message

I keep getting this error when i expecute the script

         

dama05

2:46 am on Jan 18, 2006 (gmt 0)



I am new to PHP, and have a php script that runs when a submit button is clicked on a questionnaire.htm page. I am not sure what is missing, I have provided my code below. I know its something probably simple but this is the error message i get:

Parse error: parse error, unexpected T_VARIABLE in /home/content
/html/contact.php on line 98

This is the code I have written:

<html>
<head>
</head>
<body>

<?php
//grabs the POST variables and puts them into variables that we can use
$Name=$_POST['Name'];
$practiceName=$_POST['practiceName'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
$phone=$_POST['phone'];
$fax=$_POST['fax'];
$email=$_POST['email'];
$contactTime=$_POST['contactTime'];
$numberProviders=$_POST['numberProviders'];
$typePractice=$_POST['typePractice'];
$claimsSubmitted=$_POST['claimsSubmitted'];
$patientStatements=$_POST['patientStatements'];
$billingStartDate=$_POST['billingStartDate'];
$individualClaimAmount=$_POST['individualClaimAmount'];
$totalClaimAmount=$_POST['totalClaimAmount'];
$medicarePercentage=$_POST['medicarePercentage'];
$currentlyProcessingClaims=$_POST['currentlyProcessingClaims'];

//---------VALIDATION--------
if($Name){
//----CHECK input
}
else{
$error.="Please, go back and fill out your name<br>\n";
//-- ERROR if no input
}

if($practiceName){
//---- CHECK input
}
else{
$error.="Please, go back and fill out your Practice Name<br>\n";
//---- ERROR if no input
}

if($phone){
//---- CHECK input
}
else{
$error.="Please, go back and fill your phone number<br>\n";
//---- ERROR if no input
}

if($email){
//---- CHECK input
}
else{
$error.="Please, go back and fill out your email address<br>\n";
//---- ERROR if no input
}

if($typePractice){
//---- CHECK input
}
else{
$error.="Please, go back and fill out which type of practice you have<br>\n";
//---- ERROR if no input
}


//-------->ERROR FREE
if($error==""){
echo "Thank you for inquiring about us! One of our representatives will be in touch with you shortly.";

//----------------------------------
$mailContent="--------CONTACT--------\n"
."Name: ".$Name."\n"
."Last Name: ".$lastName."\n"
."Practice Name: ".$practiceName."\n"
."address: ".$address."\n"
."city: ".$city."\n"
."state: ".$state."\n"
."zip: ".$zip."\n"
."phone: ".$phone."\n"
."fax: ".$fax."\n"
."email: ".$email."\n"
."contactTime: ".$contactTime."\n"
."numberProviders: ".$numberProviders."\n"
."typePractice: ".$typePractice."\n"
."claimsSubmitted: ".$claimsSubmitted."\n"
."patientStatements: ".$patientStatements."\n"
."billingStartDate: ".$billingStartDate."\n"
."individualClaimAmount: ".$individualClaimAmount."\n"
."totalClaimAmount: ".$totalClaimAmount."\n"
."medicarePercentage: ".$medicarePercentage."\n"
."currentlyProcessingClaims:".$currentlyProcessingClaims."\n"
//----------------------------------
$toAddress="info@gmail.com";
$subject="Questionnaire";
$recipientSubject="Questionnaire";
$receiptMessage = "Thank you ".$Name." for inquiring about!\n\n\nHere is what you submitted to us:\n\n"
."--------CONTACT--------\n"
."Name: ".$Name."\n"
."Practice Name: ".$practiceName."\n"
."address: ".$address."\n"
."city: ".$city."\n"
."state: ".$state."\n"
."zip: ".$zip."\n"
."phone: ".$phone."\n"
."fax: ".$fax."\n"
."email: ".$email."\n"
."contactTime: ".$contactTime."\n"
."numberProviders: ".$numberProviders."\n"
."typePractice: ".$typePractice."\n"
."claimsSubmitted: ".$claimsSubmitted."\n"
."patientStatements: ".$patientStatements."\n"
."billingStartDate: ".$billingStartDate."\n"
."individualClaimAmount: ".$individualClaimAmount."\n"
."totalClaimAmount: ".$totalClaimAmount."\n"
."medicarePercentage: ".$medicarePercentage."\n"
."currentlyProcessingClaims:".$currentlyProcessingClaims."\n"
//----------------------------------
mail($email, $subject, $receiptMessage,"From:$toAddress");
//----------------------------------
mail($toAddress,$recipientSubject,$mailContent,"From:$email");
}
?>
</body>
</html>

jc_armor

5:21 am on Jan 18, 2006 (gmt 0)

10+ Year Member



you lack semicolon at the end of your statement on the previous statement (based on the line number) :)