![]() |
|
![]() | ||
|
Subject:
Retrieve lost password in ASP
Category: Computers > Internet Asked by: elfynet-ga List Price: $10.00 |
Posted:
19 Jun 2003 01:33 PDT
Expires: 20 Jun 2003 07:59 PDT Question ID: 219126 |
I want to have a page on my website where a registered user can retrieve his lost password upon submission of his email address. The password is then sent to his email address. The data structure in the database is as follows (in Access) tblForumParticipants Username Password Email My website is in ASP VBscript, hosted on a Microsoft Server that supports the JMail and ASPMail components. I have a simple submission form that retrieves the email address in the Email field. What code should I use in the page processing the form? (I found tutorials using the CDONTS component but it is not supported by my ISP) |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Retrieve lost password in ASP
From: nathanrice-ga on 19 Jun 2003 11:32 PDT |
Create a database connection and retrieve the users password from the submitted email address set oConn=Server.CreateObject("ADODB.connection") vCS = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\wwwroot\database\accesssample.mdb" Change this to point to your db connection oConn.connectionstring = vCS oConn.Open set oRS=server.createobject("ADODB.recordset") strCommand = "SELECT Password FROM tblForumParticipants WHERE Username=" & Request.Form(EmailAddress) & Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.FromName = "Joes Widgets Corp." Mailer.FromAddress= "Joe@somehost.com" Mailer.RemoteHost = "mailhost.localisp.net" Mailer.AddRecipient "John Smith", "jsmith@anotherhostname.com" Mailer.Subject = "Your Widgets Corp. password." Mailer.BodyText = "Dear Stephen" & VbCrLf & "Your widgets password is " & oRS(Password).Value if Mailer.SendMail then Response.Write "Mail sent..." else Response.Write "Mail send failure. Error was " & Mailer.Response end if ------ That should work but I haven't tried or debuged it, I'm pretty sure I probably fat fingered something so you'll have to double check it. It's a start though. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |