'; $_SESSION = array(); $_SESSION['captcha'] = simple_php_captcha(); } else{ if(emailExists($email) != NULL && emailExists($email) != ""){ $createdString = randString(32); insertInTable('forgot_password', array('user_email' => $email, 'token' => $createdString)); $message = 'Hello! This message was sent to you because it seems that you forgot your password. We have put a link here to help you recreate a new one! Click on it or copy-paste it to the address bar and hit Enter. ================================================================================== http://lifeorganiser.squey.com/password-recovery.php?i='.$createdString.' ================================================================================== This link will expire in 30 minutes! If you did not request the recovery of your password, we are sorry for bothering you and we ask you to simply ignore this email. Do not reply this message as it was automatically sent! Have a nice day!'; sendNewMail($email,'Password reset - lifeorganiser.squey.com',$message); $success = 'An email was sent to your account. Follow the steps in the email to recover your password!
'; } else{ $error .= 'This email does not exist in our database!
'; } } } $_SESSION = array(); $_SESSION['captcha'] = simple_php_captcha(); include "include/header.inc.php"; ?>