Parse error, not sure what to do.
Posted: Mon Mar 22, 2004 8:25 pm
Code i got from a phpfreaks tutorial and edited a bit... getting a Parse error: parse error in /data/hosted/Gappa/dor/contact.php on line 86
Pretty sure they will occur on line 87, 88 and 89 as well...
86 being this I beileve..
really not sure what is wrong, can any body gimme a hand please?
Full script (if required)...
Pretty sure they will occur on line 87, 88 and 89 as well...
86 being
Code: Select all
$toAddress="gappamurphy@hotmail.com";really not sure what is wrong, can any body gimme a hand please?
Full script (if required)...
Code: Select all
<html>
<head>
</head>
<body>
<?php
/* grabs the POST variables and puts them into variables that we can use */
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$company=$_POST['company'];
$email=$_POST['email'];
$website=$_POST['website'];
$countryCode=$_POST['countryCode'];
$phone=$_POST['phone'];
$phoneExt=$_POST['phoneExt'];
$mobile=$_POST['mobile'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$country=$_POST['country'];
$postCode=$_POST['postCode'];
$inquiring=$_POST['inquiring'];
//---------VALIDATION---24----->
if($firstName){//----> CHECK input
}
else{
$error.="Please, go back and fill out your first name\n";//----> ERROR if no input
}
if($lastName){//----> CHECK input
}
else{
$error.="Please, go back and fill out your last name\n";//----> ERROR if no input
}
if($email){//----> CHECK input
}
else{
$error.="Please, go back and fill out your e-mail address\n";//----> ERROR if no input
}
if($phone){//----> CHECK input
}
else{
$error.="Please, go back and fill out your phone number\n";//----> ERROR if no input
}
if($address){//----> CHECK input
}
else{
$error.="Please, go back and fill out your mailing address\n";//----> ERROR if no input
}
if($city){//----> CHECK input
}
else{
$error.="Please, go back and fill out your city name\n";//----> ERROR if no input
}
if($postCode){//----> CHECK input
}
else{
$error.="Please, go back and fill out your post code\n";//----> ERROR if no input
}
//-------->ERROR FREE??
if($error==""){
echo "Thank you for inquiring about us! A receipt of your submission will be e-mailed to you almost immediately.";
//----------------------------------
$mailContent="--------CONTACT--------\n"
."First Name: ".$firstName."\n"
."Last Name: ".$lastName."\n"
."Company: ".$company."\n"
."E-mail: ".$email."\n"
."Website: ".$website."\n\n--------PHONE--------\n"
."Phone: ".$countryCode." ".$phone."\n"
."Extension: ".$phoneExt."\n"
."Mobile: ".$mobile."\n\n--------ADDRESS--------\n"
."Street Address: ".$address."\n"
."City: ".$city."\n"
."State: ".$state."\n"
."Country: ".$country."\n"
."Post Code: ".$postCode."\n\n--------INFO--------\n"
."Inquiring About: ".$inquiring."\n"
//----------------------------------
$toAddress="gappamurphy@hotmail.com";
$subject="Romeld Australia";
$recipientSubject="Romeld Australia";
$receiptMessage="Thank you ".$firstName." for inquiring about Romeld Australia!\n\n\nHere is what you submitted to us:\n\n"
."--------CONTACT--------\n"
."First Name: ".$firstName."\n"
."Last Name: ".$lastName."\n"
."Company: ".$company."\n"
."E-mail: ".$email."\n"
."Website: ".$website."\n\n--------PHONE--------\n"
."Phone: ".$countryCode." ".$phone."\n"
."Extension: ".$phoneExt."\n"
."Mobile: ".$mobile."\n\n--------ADDRESS--------\n"
."Street Address: ".$address."\n"
."City: ".$city."\n"
."State: ".$state."\n"
."Country: ".$country."\n"
."Post Code: ".$postCode."\n\n--------INFO--------\n"
."Inquiring About: ".$inquiring."\n"
//----------------------------------
mail($email, $subject, $receiptMessage,"From:$toAddress");
//----------------------------------
mail($toAddress,$recipientSubject,$mailContent,"From:$email");
}
else{
print "Sorry, but the form cannot be sent until the fields indicated are filled out completely - \n";
print "$error\n";
print "\n";
print "\n";
print "Please use your "Back" button to return to the form to correct the omissions. Thank you.\n";
}
?>
</body>
</html>