Guys need a little help... Code looks good from my side.. but I tells me the last line is botched.. Any suggestions...
<?
/ grabs the POST variables and puts them into variables that we can use /
$firstName=$POST['firstName'];
$phone=$POST['phone'];
$email=$POST['email'];
$comments=$POST['comments'];
$source=$_POST['source'];
//---------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"
."Home Phone: ".$phone."\n"
."E-mail: ".$email."\n"
."Comments: ".$comments."\n";
//----------------------------------
$toAddress="me@myemail.net";
$subject="Quick 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"
."First Name: ".$firstName."\n"
."Home Phone: ".$phone."\n"
."E-mail: ".$email."\n"
."Comments: ".$comments."\n";
//----------------------------------
mail($email, $subject, $receiptMessage,"From:$toAddress");
//----------------------------------
mail($toAddress,$recipientSubject,$mailContent,"From:$email");
//--->echo $mailContent;
?>