"; //Verify CAPTCHA - KCode if ( $_SESSION["KCode"] != $_POST["txtSecurity"]) { $Err++; $strMsg .= "[$Err] Security verification failed.
"; } //Check word count $WC = str_word_count( $_POST["txtEssay"] ); if ($WC>500) { $Err++; $strMsg .= "[$Err] You've exceeded the maximum limit of 500 words. You have $WC. Please consider revising.
"; } if ($WC<5) { $Err++; $strMsg .= "[$Err] You have not included a valid essay.
"; } //Verify if email address is valid if ( ValidateEmail($_POST["txtEmail"]) !=1 ) { $Err++; $strMsg .= "[$Err] Your email address is invalid.
"; } //Check length of name if ( strlen($_POST["txtSpouse"])<3 ) { $Err++; $strMsg .= "[$Err] You've entered an invalid name.
"; } if ( strlen($_POST["txtEssayTitle"])<3 ) { $Err++; $strMsg .= "[$Err] Please give a suitable title.
"; } if ( $Err==0 ) //All's well so update { //Store info in DB include "DBConn.php"; //to open the DB $Email = $_POST["txtEmail"]; $SpouseType = $_POST["optPastPresent"]; $SpouseName = $_POST["txtSpouse"]; $EssayTitle = $_POST["txtEssayTitle"]; $Essay = $_POST["txtEssay"]; //CheckEsc($SpouseName); //CheckEsc($EssayTitle); //CheckEsc($Essay); $strSQL = "INSERT INTO tblCandidates (Email, SpouseType, SpouseName, EssayTitle, Essay, SubmittedOn) VALUES ('$Email', '$SpouseType', '$SpouseName', '$EssayTitle', '$Essay', NOW() )"; //echo "query is $strSQL :::"; mysql_query($strSQL, $Conn) or die( mysql_error() ); $strMsg= "Your entry was successfully updated
"; //send mail to Nancy - lifetimecontest@yourmilitary.com $SenderName = $SpouseName; $SenderEmail= $Email; $SenderSubject = "Essay Submission"; $RecEmail = "lifetimecontest@yourmilitary.com"; $strMailBody = '

Sender email : ' . $Email . '
Sender name : ' . $SpouseName . '
Spouse Type : ' . $SpouseType . '
Essay Title : ' . $EssayTitle . '
Essay...

' . $Essay . ' '; // 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); } } include_once "CaptchaK/Captcha-KLib.php"; $Code = NewCode(); $_SESSION["KCode"] = $Code; //echo "Your answer is $Code"; ?> Untitled Document

 

Tell-Your-Own-Story Contest
Email " size="30" />
Name of Spouse " size="35" />
Status



Essay Title " size="35" />
Essay
Please make sure that it does not exceed 500 words.
Verification of user authenticity
Recognize this text? Type it in the box below
 
 
   

 

 

Active duty Army, Navy, Marines, Coast Guard, Air Force, their families, Veterans, retirees and federal employees visit their local military installation community on YourMilitary.com. We are now in over 250 military markets nationwide and provide vital local information.

  Share this page!                  Follow us!

 

 

 

YourMilitaryBlog.com
YourMilitaryBooks.com
YourMilitaryJobs.com

 
Spouse Central
Veteran Benefits
Retiree Benefits
Email the Troops
Air Show Information
Space-A Travel
 
Contact Us
Press Releases
About Us
Advertise
Follow Us on Twitter
Follow Us on Facebook

 

 

Copyright © 2014, YourMilitary.com except where otherwise noted. All rights reserved worldwide. Not an official government website. Site Map