prepare(“insert into wp_mysl_mspspSponsorForm (submitDate, Age, Gender, RegFee, EarlyPass,Fines,TeamName,CoachName,Address,CityStateZip,Phone,ConfirmationEmail)
values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)”,
date(‘Y-m-d H:i:s’),
$_POST[‘AgeGroup’],
$_POST[‘Gender’],
$_POST[‘RegFee’],
$_POST[‘EarlyPass’],
$_POST[‘Fines’],
$_POST[‘TeamName’],
$_POST[‘CoachName’],
$_POST[‘Address’],
$_POST[‘CityStateZip’],
$_POST[‘Phone’],
$_POST[‘confirmationEmail’]);
if($wpdb->query($query))
{
echo(“MSPSP Form Successfully Submitted. Please use the form again if you wish to submit another sponsorship.”);
$headers = ‘From: myslwebmaster@michigansoccer.com’ . “rn” .
‘Reply-To: myslwebmaster@michigansoccer.com’ . “rn” .
‘MIME-Version: 1.0’ . “rn” .
‘Content-Type: text/html; charset=ISO-8859-1’ . “rn”;
$subject = ‘MSPSP Team Sponsorship for: ‘.$_POST[‘TeamName’];
$body = ‘
The following MSPSP Team Sponsorship Form has been submitted to MYSL:
Age: | ‘.$_POST[‘AgeGroup’].’ | Team Name: | ‘.$_POST[‘TeamName’].’ |
Gender: | ‘.$_POST[‘Gender’].’ | Coach Name: | ‘.$_POST[‘CoachName’].’ |
Reg Fee: | ‘.$_POST[‘RegFee’].’ | Address: | ‘.$_POST[‘Address’].’ |
Early Pass: | ‘.$_POST[‘EarlyPass’].’ | City, State, Zip: | ‘.$_POST[‘CityStateZip’].’ |
Fines: | ‘.$_POST[‘Fines’].’ | Phone: | ‘.$_POST[‘Phone’].’ |
‘;
mail(‘yvonnemysl@sbcglobal.net’,$subject,$body,$headers);
mail(‘johnvand@umich.edu’,$subject,$body,$headers);
if($_POST[‘confirmationEmail’])
{
mail($_POST[‘confirmationEmail’],$subject,$body,$headers);
}
}
}
?>