Error: You must specify an email!
"; $error = true; } if (!$error) { $aQuery = mysql_query ("SELECT * FROM stagdata_user where UPPER(email)='".strtoupper($email)."'"); if ($row = mysql_fetch_array($aQuery)) { $username = $row['username']; } else { echo "Error: Email not valid!
"; $error = true; } } } if (isset($_POST["submit"]) and !$error) { $newPassword = generatePassword(); $aQuery = mysql_query ("UPDATE stagdata_user set password='".md5($newPassword)."' where UPPER(email)='".strtoupper($email)."'"); $recipient = $email; $mail_body = "Your username is:-
".$username."

Your new password is:-
".$newPassword; $subject = $system_from_subject_prefix." new password requested"; $header = "From: ".$system_from_name." <".$system_from_email.">\r\n".'Content-Type: text/html; charset="iso-8859-1"\r\n'; mail($recipient, $subject, $mail_body, $header); echo "Successfully sent new password to $email!"; } else { ?>
Email Address