include_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $mysql['user_name'] = mysql_real_escape_string($_POST['user_name']); $mysql['user_email'] = mysql_real_escape_string($_POST['user_email']); $user_sql = "SELECT user_id FROM 202_users WHERE user_name='".$mysql['user_name']."' AND user_email='".$mysql['user_email']."'"; $user_result = _mysql_query($user_sql); $user_row = mysql_fetch_assoc($user_result); if (!$user_row) { $error['user'] = '
Someone has asked to reset the password for the following site and username.
http://".$_SERVER['SERVER_NAME']."
Username: ".$_POST['user_name']."
To reset your password visit the following address, otherwise just ignore this email and nothing will happen.
http://".$_SERVER['SERVER_NAME']."/202-pass-reset.php?key=$user_pass_key
"; $from = "propser202@".$_SERVER['SERVER_NAME']; $header = "From: Propser202<" . $from . "> \r\n"; $header .= "Reply-To: ".$from." \r\n"; $header .= "To: " . $to . " \r\n"; $header .= "Content-Type: text/html; charset=\"iso-8859-1\" \r\n"; $header .= "Content-Transfer-Encoding: 8bit \r\n"; $header .= "MIME-Version: 1.0 \r\n"; mail($to,$subject,$message,$header); $success = true; } $html['user_name'] = htmlentities($_POST['user_name'], ENT_QUOTES, 'UTF-8'); $html['user_email'] = htmlentities($_POST['user_email'], ENT_QUOTES, 'UTF-8'); } ?> info_top(); ?> if ($success == true) { ?>