session_start();
include "header.php";
include "config.php";
include "style.php";
?>
Forgot your password?
if($_POST['email']) {
$sql = mysql_query("SELECT * FROM members WHERE contact_email = '".$_POST['email']."'");
if(@mysql_num_rows($sql)) {
$user = mysql_fetch_array($sql);
$headers .= "From: $sitename<$adminemail>\n";
$headers .= "Reply-To: <$adminemail>\n";
$headers .= "X-Sender: <$adminemail>\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-Path: <$adminemail>\n";
$message .= "Here's the information you requested\n\nYour Userid: ".$user['userid']."\nYour Password: ".$user['pword']."\n\n";
$message .= "Log into your members area\n".$domain."/memberlogin.php\n\n\n$sitename Admin\n$adminemail\n";
@mail($user['contact_email'], "Your password", $message,$headers);
echo "Your password has been sent to your contact email.
";
} else {
echo "Invalid email.
";
}
}
?>
include "footer.php";
mysql_close($dblink);
?>