Jump to content

Forgot password mail script messen up :S


Demonic

Recommended Posts

Ok I was coding this forgot password script but for some reason when i send then email it doesn't get the email :S any one know why this is happening:

[code]
<? include "header.php"; ?>
<?php
$get_email = mysql_query("SELECT * FROM users WHERE email='$email'") or die(mysql_error());
$email_info = mysql_fetch_array($get_email);
$get_url = mysql_query("SELECT * FROM boardstatus WHERE id='1' ") or die(mysql_error());
$url_info = mysql_fetch_array($get_url);
$email = $_POST['femail'];
$subject = "Forgot Password";
$headers .= 'From: Webmaster <webmaster@noreply.com>' . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
$submit = $_POST['sendpass'];
$password = $email_info[password];
$uid = $email_info[id];
$link = $url_info[url]."/validateaccount.php?uid=".$uid."&pass=".$password;
$message = "You have requested to reset your password to do so please visit link and follow steps.\n Visit Link Here: $link \n validate account now. ";

if(isset($submit))
{

if($email_info[email] = false)
{
echo "Sorry, but that email is not in our database.";
exit;
}
mail($email,$subject,$message,$headers);
}elseif(!isset($submit))
{
?>
<table class='category'>
<tr>
<td><b>Forgot Email</b></td>
</tr>
</table>
<table class='forum'>
<tr>
<td><center><form method='post'><input type='text' name='femail'><br /><input type='submit' name='sendpass' value='Send Validation Link'></form></center></td>
</tr>
</table>
<table class='lastcatrow'>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<? } ?>
<? include "footer.php"; ?>
</body>
</html>
[/code]

Heres the email:

[code]
You have requested to reset your password to do so please visit link and follow steps.
Visit Link Here: http://*************/nevux1_3_0/validateaccount.php?uid=&pass=
validate account now
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.