$pageTitle="Lost Login"; include($_SERVER['DOCUMENT_ROOT'] . "/template/header.php"); //check for variables if($_POST['getUsername']=="Get Username"){ if($_POST['email']){ $email=$_POST['email']; $queryString="SELECT username FROM Members WHERE email='$email' LIMIT 1"; $result=database_query($queryString); if($result && mysql_num_rows($result)==1){ $myrow=mysql_fetch_row($result); //send an email with username $message="You have been sent this message by SCLCR because you or someone using this email address requsted it.\n\n"; $message.="Your username is: " . stripslashes($myrow[0]) . "\n\n\n"; $message.="-----\nSociety For Conceptual Logistics in Communication Research\nhttp://www.sclcr.com/society"; if (mail($email, "Message from SCLCR Member", $message)) { echo "
Your username was successfully emailed to the address in your profile.
\n"; echo "\n"; echo "\n"; } else { echo "We experienced a problem. Your message was not delivered correctly. Please try again a litte later. Thank you.
"; } } else{ echo "We could not find an account with your email address. Please try again.
\n"; } } else{ echo "You did not submit your email address. Please try again.
\n"; } } elseif($_POST['getPassword']=="Get Password"){ if($_POST['email'] && $_POST['username']){ $email=$_POST['email']; $username=$_POST['username']; createNewLostPassword($email, $username); } else{ echo "You did not submit your email address AND/OR username. Please try again.
\n"; } } else{ //they didn't submit anything so just show the form } ?>If you forgot your username enter your email address and it will be sent to you.
If you forgot your password and need to reset it enter your username and email. You will be sent an email with a new temporary password which you can change.
include($_SERVER['DOCUMENT_ROOT'] . "/template/footer.php"); ?>