There is no registered user with username: $_POST[ename]
"; } else { $to = $a1[CompanyEmail]; $subject = "Your username/password for $site_name"; $message = "Hello,\n here is your login information for $site_name\n\nUsername: $_POST[ename]\nPassword: $a1[epass]"; $from = "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>"; mail($to, $subject, $message, $from); echo "


Your login information was sent to $to
"; } } elseif(isset($fm)) { $q2 = "select ename, epass from job_employer_info where CompanyEmail = \"$_POST[EEmail]\""; $r2 = mysql_query($q2) or die(mysql_error()); $a2 = mysql_fetch_array($r2); if(empty($a2[0]) || empty($a2[1])) { echo "


There is no registered user with email: $_POST[EEmail]
"; } else { //=============================================================================================================== //Create a new password $Char = array ("0","1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p", "q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P", "Q","R","S","T","U","V","W","X","Y","Z"); $NewPassword = ""; for ($x=0;$x<5;$x++) { $p = rand(0,61); $NewPassword .= $Char[$p]; } //echo "you new password is $NewPassword.

"; // Write new password in the database $EPass = md5($NewPassword); $strSQL = "UPDATE job_employer_info SET epass ='$EPass' WHERE `CompanyEmail` = '" . $_POST['EEmail'] . "'; "; $Result = mysql_query($strSQL); //=============================================================================================================== $Msg = ' New Page 1

Your username/password for YourMilitaryJobs.com
Hello,
Here is your NEW login information for YourMilitaryJobs.com

Username: ' . $a2[ename] . '
Password: ' . $NewPassword . '

You may click here to log in with this information and change your password as you wish.

If clicking the above link does not work, you may copy and paste the following link on your browser\'s address bar.

http://www.yourmilitary.com/spouse/employers/EditInfo.php

 

'; $to = $_POST[EEmail]; $subject = "Your username/password for $site_name"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: \"YourMilitaryJobs.com\" \r\n" . "Reply-To: jobs@yourmilitaryjobs.com\r\n"; @mail($to , $subject , $Msg, $headers); /* $to = $_POST[EEmail]; $subject = "Your username/password for $site_name"; $message = "Hello,\n here is your login information for $site_name\n\nUsername: $a2[ename]\nPassword: $a2[epass]"; $from = "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>"; mail($to, $subject, $message, $from); */ echo "


Your login information was sent to $to
"; } } else { ?>
.

Please enter the email you used during registration. In a few minutes you will receive your login information at that email address..

 

Email: