Hello,
So I'm a total PHP newbie, but I got some help coding system to get values from a form, add them up on the next page, collect contact information, and then process it by sending an email to the admin and the client. I tried to modify this system, and now everything works EXCEPT the emailing part. I get an unexpected T_VARIABLE error. What do I do? Its on line 89, and that line is a part of the message its supposed to send, so I'm confused. I REALLY appreciate help. the is posted below.
<?php
$phone = $_POST['phone'];
$greeting = $_POST['greeting'];
$deskprof = $_POST['deskprof'];
$consult = $_POST['consult'];
$service = $_POST['service'];
$products = $_POST['produtcs'];
$oe = $_POST['oe'];
$referral = $_POST['referral'];
$again = $_POST['again'];
$phone_pts = $_POST['phone_pts'];
$greeting_pts = $_POST['greeting_pts'];
$dprof_pts = $_POST['dprof_pts'];
$consult_pts = $_POST['consult_pts'];
$service_pts = $_POST['service_pts'];
$product_pts = $_POST['product_pts'];
$oe_pts = $_POST['oe_pts'];
$referral_pts = $_POST['referral_pts'];
$again_pts = $_POST['again_pts'];
$days = $_POST['days'];
$total = $_POST['total'];
$admin = $_POST['admin'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$add1 = $_POST['add1'];
$add2 = $_POST['add2'];
$sp2 = $_POST['sp2'];
$s1 = $_POST['s1'];
$zip = $_POST['zip'];
$city = $_POST['city'];
$state = $_POST['state'];
$comments = $_POST['comments'];
if($fname == "" or $lname == "" or $email == "" or $add1 == "" or $add2 == "" or $s1 == "" or $comments == "") { $errors = "yes"; } else { $errors = "no"; }
if($errors == "no") {
echo "Thanks for the feedback! Your opinion means a lot to us and we will use your comments to better serve you and other guests. You will receive a confirmation email shortly. <br><br><a href='index.php'>Back to Lili</a>";
echo "<br><br><br>";
if($add2 != "") { $add2_pro = "
$add2"; }
// ---------------------------------------------------------- Admin Mailer ---------------------------------------
$message1 = "Hey, this is the feedback that $fname $lname just left for Lili!
Name: $fname $lname
Email: $email
Date of Service: $add1
Service Provider 1: $add2_pro
Service Provider 2: $sp2
Service 1: $s1
Service 2: $zip
Service Provider(s) Comments: $city
Comments on Lili: $state
Permission for use on web: $comments
-----------------------------------------------------------
This is your point total and breakdown of points.
Total Points: $total
Phone: $phone_pts
Greeting: $greeting_pts
Desk: $dprof_pts
Consultation: $consult_pts
Service: $service_pts
Product desc.: $product_pts
Overall: $oe_pts
Come Again? $again_pts
-----------------------------------------------------------
Sent by Lili-Feedback, by Matt Norris";
$headers1 = 'Reply-To: ' .$email. "\r\n" .
'From: noreply@salonlili.com \r\n';
mail($admin, "New Feedback, $message1, $headers1); "
// ---------------------------------------------------------- Receipt Mailer ---------------------------------------
$message2 = "Hi, $fname $lname ! Thanks for taking the time to fill out our feedback form! We look forword to seeing you again!
-----------------------------------------------------------
Sent by Lili-Feedback, by Matt Norris";
$headers2 = 'Reply-To: ' .$admin. "\r\n" .
'From: noreply@salonlili.com \r\n';
mail($email, "Lili-Feedback -- Thank-you!", $message2, $headers2);
} else {
echo "Errors were found in your order. Please <a href='javascript:history.go(-1)'> go back</a> and fix them.";
}
?>
Hopefully someone here can help.
Also, please don't use any of the addresses for anything other than to look at the site, for example. you can find the full php in a frame at salonlili [dot] com / csvc.htm