session_start();
include_once "../main.php";
if( isset($_POST["cmdContinue"]) )
{
$Err=0;
//validate email address
//verify if it is in the db already
if( strlen( $_POST["txtEmail"] )<5 )
{
$Err=1;
$strMsg = "Invalid email address
";
}
else
if( HaveEmail($_POST["txtEmail"], "E")>0 )
{
$Err=1;
$strMsg = "Sorry, this email address is already in use.
";
}
else
{
//Set Session variable with email address
$_SESSION["EEmail"]= $_POST["txtEmail"];
//insert email address into TempEmail table
StoreTempEmail($_POST["txtEmail"], "E");
//Send mail to the user
$SenderName = "Your Military Jobs"; // you may change this
$SenderEmail= "jobs@yourmilitary.com";
$SenderSubject = "YourMilitaryJobs.com Registration: Your next step...";
$RecEmail = $_POST["txtEmail"];
$URLPath = $_SERVER["HTTP_HOST"];
if( $domain=="yourmilitary") $URLPath .= "/spouse";
//Be cautious when modifying this string.
$strMailBody = '
Thank you for registering on the YourMilitaryJobs.com employment network.
This mail is sent to you in response to your new registration request. Please click here to continue...
If you are unable to view the link above, please copy the following link and paste it in your browser\'s address bar:
https://'. $URLPath . '/employers/employer_registration.php?pEmail='.$_POST["txtEmail"].'
We are now in over 250 military markets nationwide and for a complete list of our employment areas please visit www.YourMilitaryJobs.com.
As an added bonus, once you register, your information will be available in EVERY military community nationwide!
Good luck and if you need to contact us please email our staff at jobs@yourmilitary.com.
Thank you! '; // End of $strMailBody $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: $SenderEmail\r\n" . "Reply-To: $SenderEmail\r\n"; @mail($RecEmail, $SenderSubject, $strMailBody, $headers); $strMsg = "An email has just been sent to your registration email account. Please open the email and click on the link shown to complete the registration process. The email will arrive from jobs@yourmilitary.com and may appear in your bulk email folder.
| New Employer Registration |