Please fill out all of the required fields (*).
';
// format and send the email
} else {
$form = "clear";
// formats the text for the email
$body =
"
Student Information
" .
"First Name: {$_POST['first']}
" .
"Last Name: {$_POST['last']}
" .
"Address: {$_POST['address']}
" .
"City: {$_POST['city']}
" .
"Postal Code: {$_POST['postal']}
" .
"Date of Birth: {$_POST['birthday']}
" .
"Home Phone: {$_POST['phone']}
" .
"Cell Phone: {$_POST['cellPhone']}
" .
"Email: {$_POST['email']}
" .
"I consent to receiving electronic communications from the SCSA: {$_POST['consent']}
" .
"
" .
"Employer Information
" .
"Company Name: {$_POST['company']}
" .
"Address: {$_POST['companyAddress']}
" .
"City: {$_POST['companyCity']}
" .
"Postal Code: {$_POST['workPostal']}
" .
"Phone: {$_POST['workPhone']}
" .
"Fax: {$_POST['workFax']}
" .
"Email: {$_POST['workEmail']}
" .
"Contact Name: {$_POST['contactName']}
";
$body = wordwrap($body, 110);
// format the header for the mail function
$headers = "From: no-reply@scsaonline.ca" . "\r\n";
$headers .= "Reply-To: " . "{$_POST['email']}" . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
//mail function
mail('scsaprograminfo@scsaonline.ca', 'SCSA Registration Form - HSA', $body, $headers);
if ($_POST['consent'] == 'yes') {
mail('comm@scsaonline.ca', 'SCSA Registration Form - HSA', $body, $headers);
}
$formResult = 'Your application was sent successfully!
';
$_SESSION['body'] = $body;
header('Location: http://www.scsaonline.ca/confirmation');
}
}
?>
National Health and Safety Administrator (NHSA™) Program - Saskatchewan Construction Safety Association
Registration Form
Health and Safety Administrator (HSA)