Hey Guys.... Looking at this code.. It looks right.. What am I doing wrong...
If you can examine it and let me know.....
JAY
It says line 44 is wrong...:mad:
<?php
$firstName=trim($_POST['firstName']);
$address=trim($_POST['address']);
$city=trim($_POST['city']);
$zip=trim($_POST['zip']);
$phone=trim($_POST['phone']);
$cphone=trimp($_POST['cphone']);
$email=trim($_POST['email']);
$contact=trim($_POST['contact']);
$priority=trim($_POST['priority']);
$within=trim($_POST['within']);
$when=trim($_POST['when']);
$source=trim($_POST['source']);
$comments=trim($_POST['comments']);
//---------VALIDATION-------->
if($firstName){//----> CHECK input
}
else{
$error.="Please, go back and fill input your full name<br>\n";//----> ERROR if no input
}
if($phone){//----> CHECK input
}
else{
$error.="Please, go back and input your home phone number, with area code<br>\n";//----> ERROR if no input
}
if($email){//----> CHECK input
}
else{
$error.="Please, go back and fill in you email address<br>\n";//----> ERROR if no input
}
if($comments){//----> CHECK input
}
else{
$error.="Please, go back and fill out the direct source if N/A, please enter N/A<br>\n";//----> ERROR if no input
}
//-------->ERROR FREE??
if($error==""){
echo "Thank you for inquiring about our FREE ESTIMATE! A receipt of your submission will be e-mailed to you almost immediately.";
}
//----------------------------------
$mailContent="--------CONTACT--------\n"
."Full Name: ".$firstName."\n"
"Address: ".$address."\n"
"City: ".$city."\n"
"State: ".$state."\n"
"Zipcode: ".$zip."\n"
."Home Phone: ".$phone."\n"
"Mobile Phone: ".$cphone."\n"
."E-mail: ".$email."\n"
"Contact via: ".$contact."\n"
"Interested in: ".$priority."\n"
"Starting the project: ".$within."\n"
"QRG can contact me: ".$when."\n"
"How did you hear about us: ".$source."\n"
."Comments: ".$comments."\n";
//----------------------------------
$toAddress="me@myaddy.net";
$subject="Long Form Free Estimate";
$recipientSubject="Free Estimate Contact Form";
$receiptMessage = "Thank you ".$firstName." for inquiring about QRG's FREE ESTIMATE!\n\n\nHere is what you submitted to us:\n\n"
."--------CONTACT--------\n"
."Full Name: ".$firstName."\n"
"Address: ".$address."\n"
"City: ".$city."\n"
"State: ".$state."\n"
"Zipcode: ".$zip."\n"
."Home Phone: ".$phone."\n"
"Mobile Phone: ".$cphone."\n"
."E-mail: ".$email."\n"
"Contact via: ".$contact."\n"
"Interested in: ".$priority."\n"
"Starting the project: ".$within."\n"
"QRG can contact me: ".$when."\n"
"How did you hear about us: ".$source."\n"
."Comments: ".$comments."\n";
//----------------------------------
mail($email, $subject, $receiptMessage,"From:$toAddress");
//----------------------------------
mail($toAddress,$recipientSubject,$mailContent,"From:$email");
//--->echo $mailContent;
?>