Send user Password by Email if User forgets

Allow the your Users the opportunity to receive their Passwords by Email if they forget by submitting their Usernames. Once the User submits his or her registered Username, an email is automatically sent to the Email the Username registered with.
 
Part 1 » Part 2 » Part 3 -- Demo
 
Forgotten Password - Part 2-
Automatically Send Users their Passwords via Email upon request if it has been forgotten

Step 3 continued...

- All we want to do is change the Run-Time value. Because currently it is a session but we are not using a session on the forotpassword.asp page. The requester is simply inserting the User Name in a Form. SO GUESS what the Run-Time value will be:
Request.Form
You got it!! So change the Run-Time Value as such:

Change Session("MM_UserName") to Request.Form("UserName") Click OK. We're done with the recordset.

Note:
I just wanted to let you know for future reference that you could have done this in simple mode and just chose form variable from the drop down.
1>>

2>>
UD would automatically rights the sql if you look in advance mode, and by default it will name your variables for you.

You could have also chose a session from the drop down in simple mode:
(Notice the other options)

I just wanted you to get comfortable with Advanced Mode and writing in your sql


Step 4:


- Now we said that if the Requester types in a UserName that has never been registered we would redirect him or her to another page. You thought I forgot. This isn't hard. The concept is that if the Requester requests a UserName that isn't in the db, then the recordset will come up blank. So all we need to do is redirect the Page if the recordet comes up blank.

- J.S. has an extension that inserts the code. It can be found in his free MagicSuite2000 package. Once you install it you will find the extensions under Magic Beat UD4 in Server Behaviors and you will choose the appropriate extension called:

the following dialog box should appear:

select the appropriate recordset and redirect. I redirected to the page we will make called forgotpasswordfailed.asp. Thats It.

Note: The extension simply inserts a code as such:
<%
If (rsRecordset1.EOF) Then
Response.Redirect("yourPage.asp")
End If
%>

You can find a similar code on Hiran's site in his Step 3. That is all the code needed, place the code after the generated recordset in the source code. OOOPS! didn't mean to say the bad word. I'll try not to do it again. Please don't be mad o) You're so forgiving.
Continue to Part 3

Go to Part 3
Go Home
Back to Top

Omar Elbaga

Starting out as a fine artist, Omar Elbaga gradually moved to computer graphic arts. He was particularly amazed by the power of the World Wide Web, so he embarked upon building small-scale sites for fun utilizing HTML and his Art background. Falling in love with designing web pages and its potential, he began a career in web design. Omar has since been in the web development field for several years. With his head in computer books nearly 24 hours a day, Omar moved on to enhance his skills from web design to web programming.

Most of his work involves building database-driven web sites for small companies. Omar is currently running a popular Dreamweaver MX resource site named dmxfire.com

See All Postings From Omar Elbaga >>

Comments

Page layout of Tutorial

January 24, 2002 by ahha haha

Hi all,

i like to print out these tutorials as I find it helps me do things step by step, but while printing out these pages things are not formated correctly, ie text on the right ends up overlapping some of the tutorial, and sometimes the page is cut between important lines. can something be done about this .

Super regards

 

ah ha

RE: Page layout of Tutorial

January 24, 2002 by Omar Elbaga

Hi,
is that only this tutorial or all tutorials generally on udzone that you are having problems printing with?

RE: Page layout of Tutorial

January 28, 2002 by George Petrov
We will soon make a "Print Tutorial" feature available. So you can print it nicely without the UDzone framework.

Very convoluted

April 29, 2002 by pc pete

I've just worked through this tutorial; it does exactly what it says on the tin, but its very convoluted; I had to jump to several other pages (for example, to find out what JMail was). It assumes that you are working through a series of tutorials in order; most people (like me) won't..they'll have a single problem, and want a single solution.

Other than that, well done!

See all 7 Comments

You must me logged in to write a comment.