复制代码 代码如下:
<input type="hidden" value="chris" />
<p>Please specify the email address where you want your new password sent:
<input type="text" />
<input type="submit" value="Send Password" />
</form>
复制代码 代码如下:
<?php
session_start();
$clean = array();
$email_pattern = '/^[^@/s<&>]+@([-a-z0-9]+/.)+[a-z]{2,}$/i';
if (preg_match($email_pattern, $_POST['email']))
{
$clean['email'] = $_POST['email'];
$user = $_SESSION['user'];
$new_password = md5(uniqid(rand(), TRUE));
if ($_SESSION['verified'])
{
/* Update Password */
mail($clean['email'], 'Your New Password', $new_password);
}
}
?>
新闻热点
疑难解答