session_start();
include_once "../main.php";
if( isset($_POST["cmdContinue"]) )
{
$Err=0;
//validate email address
//verify if it is in the db already
if( HaveEmail($_POST["txtEmail"], "J")>0 )
{
$Err=1;
$strMsg = "Sorry, this email address is already in use.
";
}
else
{
//Set Session variable with email address
$_SESSION["JEmail"]= $_POST["txtEmail"];
//insert email address into tblTempEmails table
StoreTempEmail($_POST["txtEmail"], "J");
//Send mail to the user
$SenderName = "YourMilitaryJobs.com"; // you may change this
$SenderEmail= "jobs@yourmilitary.com";
$SenderSubject = "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 our 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 on your browser\'s address bar:
http://'. $URLPath . '/jobseekers/jobseeker_registration.php?pEmail='.$_POST["txtEmail"].'
We are now in over 240 military markets nationwide and for a complete list of our employment websites please visit www.YourMilitaryJobs.com.
As an added bonus, once you register, your information will be available in EVERY employment website that we have 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 User Registration |