";
}
if($last == "") {
$err = true;
$usrMsg .= "Enter your last name.
";
}
if (!is_valid_email($email) || contains_bad_str($email) || contains_newlines($email)) {
$err = true;
$usrMsg .= "Enter a valid email address.
";
}
if($city == "") {
$err = true;
$usrMsg .= "Enter your city.
";
}
if($country == "") {
$err = true;
$usrMsg .= "Select your country.
";
}
if(contains_bad_str($message)) {
$err = true;
$usrMsg .= "Sorry, unable to send email at this time.
";
}
// Add data to Contact List
if($listMember == "yes") {
include("../admin/config.php");
$date= date ("Y-n-j");
$data = "INSERT INTO `contacts` (`date` , `first` , `last` , `email` , `street` , `city` , `state`, `zip`, `country`) VALUES('$date', '$first', '$last', '$email', '$street', '$city', '$state', '$zip', '$country')";
mysql_query($data);
mysql_close();
}
$mailto = "talk@kronosquartet.org";
$mailsubj = "email from kronosquartet.org";
$mailhead = "From: $email\n";
if(!$err) {
mail($mailto,$mailsubj,$message,$mailhead);
$usrMsg .= "
Email sent.
"; if($listMember == "yes") { $usrMsg .= "You have been added to our mailing list.
"; } } else { $usrMsg = "Please correct the following errors:
\n" . $usrMsg . "
![]() |
|
|