CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Forgotten Password Form Problems

Print topic Send  topic

Author Message
dava133
Posted: 03/11/2002, 5:13 AM

I have been trawling through the posts about this for hours now and still havent got it working! Im using the example from Gotocode and im using ASP w/ templates and CDONTS, all ivemanaged to get at the moment is my login page not loading at all or if it does when i try and submit the email or user name i just get an Error screen (500) and it hasnt been emailed:( Can someone in the same senario as me who has got it working please post the code theyve put in "before insert" and "validation" so i can try that. If it helps my users table is called "Address", user_login = "user_name", password = "pw", email = "Email" and ive kept the field of the Forgot form user_entry, cheers
Nicole
Posted: 03/11/2002, 7:11 AM

Hello,
I assume that "Forgot Password" form is of record type. In this case try to use code like below to send forgotten password:

login = dLookUp("Address", "user_login", "email = " & ToSQL(fldemail, "Text"))
password = dLookUp("Address", "password", "email = " & ToSQL(fldemail, "Text"))
if not isEmpty(login) and not isEmpty(password) then
'send mail code goes here
end if
dava133
Posted: 03/11/2002, 1:39 PM

so I put that bit of code where?? and I just put my bit of CDONTS code in where u say yeah? thanks for the reply,
Nicole
Posted: 03/12/2002, 1:25 AM

Try to put the code to BeforeInsert event
dava133
Posted: 03/12/2002, 9:01 AM

Right this is what I have in my beforeinsert :

login = dLookUp("Address", "user_name", "email = " & ToSQL(flduser_entry, "Text"))
password = dLookUp("Address", "password", "email = " & ToSQL(flduser_entry, "Text"))
if not isEmpty(login) and not isEmpty(password) then

Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = "dava133@whatever.com"
objCDO.From = "dava133@whatever.com"
objCDO.Subject = "Login Information"
objCDO.Body = _
"Per your request, we are emailing you your login information." & VBcrlf & _
"Your Username/Login is: " & login & VBcrlf & _
"Your Password is: " & password & VBcrlf & _
VBcrlf & _
objCDO.MailFormat = 0
objCDO.Send

flddate_sent = Now()

end if


ignoring the sent to and from bits, it doesnt work, can u explain what the bit of code u actually posted does exactly because I am a bit unclear, this doesnt produce any errors and proceeds to the next page just nothing is sent. cheers
dava133
Posted: 03/12/2002, 5:31 PM

finally got it working!! Seems so easy now and even adapted it slightly, id be glad to share what ive done if ne one else is having trouble,

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.