Forgot Password
"; print_r($_REQUEST);*/ if( (isset($_POST['forgot_pss_x']) || isset($_POST['forgot_pss']))) { $email=$_POST['txtemail']; $email = stripslashes($email); $email = mysql_real_escape_string($email); $r = $db->select("SELECT * FROM user_master where email='$email' and user_status = 1 "); $count = sizeof($r); if($count > 0) { $row = $r; $password=$row[0]["password"]; $email=$row[0]["email"]; $newPass = str_rand(8, 'alphanum'); $new_md_pass = md5($newPass); $update_user_array = array('password' => $new_md_pass); //print_r($update_user_array); //$data = array('date_added' => time()); $rows = $db->update_array('user_master', $update_user_array, "email='$email'"); if (!$rows) $db->print_last_error(false); if ($rows > 0) { //echo "$rows rows updated."; } $str_headers ="";// $str_body="
Your Account Details
Please Login to Your Account using below login details.
Email : $email
Password : $newPass
Please Login your account using above details and Enter your new password using Edit my account.
Sincerely yours,
Restaurant Manager
 
"; // $str_body; echo "
"; $str_headers = "From: anatoliaturkishgrill@anatoliaturkishgrill.com \r\n"; $str_headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; @mail($email, "Anatolia - Forgot Password ", $str_body, $str_headers); /*Send Email Alert*/ if ($_SERVER["SERVER_NAME"]=="developer4" || $_SERVER["SERVER_NAME"]=="localhost" || $_SERVER["SERVER_NAME"]=="90.0.0.15" ) {$msg = "Details have been mailed to your email Address. Your new Password = $newPass"; } else {$msg = "Details have been mailed to your email Address."; } //header("location: forgot_password.php?msg=".htmlentities(urlencode($msg))); $msr_new= htmlentities(urlencode($msg)); ?>
( Fields marked as * below are mandatory )
Email Address * :