for some reason once you typed in your username you dont recieve an email?PHP Code:<?
include('config.php');
if (!$_POST[submit])
{
?>
<form name="form1" method="post" action="">
<p><font face='Verdana' size='1'><b>
Forgotten Password</b><br /><br /><font face='Verdana' size='1'>
If you have forgotten your Password, you may enter your Username below and you will be sent an Email containing details on how to reset it..<br /><br />
<b>Username;</b><br />
<input name="username" type="text" id="username">
<br />
<br />
<input type="submit" name="submit" value="Recover Password">
</p>
</form><br />
<font face='Verdana' size='1'>+ <a href='login.php' style='text-decoration: none'>Back to Main Page</a>
<?
}
else
{
?>
<?
$username = $_POST[username];
$username = htmlspecialchars($username);
$code=rand(151343,18618774);
$query = mysql_query("INSERT INTO forgotpw (username, code) VALUES('$username','$code')");
$getemail = MYSQL_QUERY("SELECT * email from users WHERE username='$username'");
$sitename = 'PixelResources';
$subject = 'PixelResources Members System - Password Recovery';
$message = 'Hello.. <br>
Please visit the URL below and type in the Validation Code on the page you end up at;<br><br>
http://www.yoursite.com/passcode.php<br><br>
Your Validation Code Is; $code <br><br>
Thankyou.. PixelResources.. ';
$headers = 'From: $sitename' . "\r\n" .
mail($getemail, $subject, $message, $headers);
echo('<font face="verdana" size="1"><b>Thankyou</b><br /><br />An Email has been dispatched to the Email registered with the account with details on how to reset the Password.. <br /><br />+ <a href="passcode.php" style="text-decoration: none">Proceed to Step 2</a><br />+ <a href="login.php" style="text-decoration: none">Main Page</a>');
?>
<?
}
?>





Reply With Quote









