Jump to content

forgotten password


eranwein

Recommended Posts

[!--quoteo(post=351367:date=Mar 3 2006, 10:35 AM:name=eranwein)--][div class=\'quotetop\']QUOTE(eranwein @ Mar 3 2006, 10:35 AM) [snapback]351367[/snapback][/div][div class=\'quotemain\'][!--quotec--]
can anybody send me a link to a script that handles with sending a reminder email to a user that forgot his passwrod?
[/quote]


Do you want a link to an already-made script that you can copy and paste or are you looking for a tutorial on how to do it?
Link to comment
Share on other sites

I hope this works for you.
an example ok

[code]
<?php
if($go == "1")
{
mysql_connect("host","username","password");
mysql_select_db(databaseName);

$sql = @mysql_query("SELECT * FROM table WHERE username='$name' && email='$email' ");
if(!$sql)
{
echo "The user name and email do not match.";
exit;
}
$query = mysql_query($sql);
$fPass = mysql_fetch_array($query);

mail($email, "Your Password", "User Name: ". $fPass[username] ."\nPassword: ". $fPass[password]);
echo "Your Password has been sent to ". $email .".";
}
?>
<form action="<?= $PHP_SELF ?>" method="post">
Name: <input type="text" name="name" size="24" border="0"><br>
E-mail: <input type="text" name="email" size="24" border="0"><br>
<input type="hidden" name="go" value="1" border="0"><input type="submit" name="submitButtonName" border="0">
</form>
[/code]
good luck.
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.