forgot password form in vb6?
Hi!
I have a login form, I'm planning to create a form that when you forgot your password you can retrieve your account just like Facebook..
in the forgot password form there's a question that you will answer..
the question is the hint to retrieve the password..
thank you!
Re: forgot password form in vb6?
Interesting and good for you :-)
Is there a question?
Re: forgot password form in vb6?
And you will retrieve it from where? :confused: :confused: :confused:
Re: forgot password form in vb6?
yup! can you help for that?
thank you
Re: forgot password form in vb6?
I was just kidding but most everyone here is willing to help. We need to know how far along are you and are there issues. In other words do you have specific questions?
Re: forgot password form in vb6?
i have a login form, if i forgot the password how can i open the program?
what is the alternative way?
the only way i think is to put a forgot password at the bottom of the form.
Re: forgot password form in vb6?
RhinoBull got the ball rolling...And you will retrieve it from where?
Where are the password and ID stored now? Database, textfile, in the program, etc. Without knowing that we can't help designing where\how the "forgot password" logic should be created.
Re: forgot password form in vb6?
I'm not sure it really matters.
The important thing is that you have the info for retrieval from somewhere. This means you need the question, the correct answer, and the password itself.
Usually though you never want to store passwords at all, but instead you store a one-way hash of the password. This means if they forget and go through the Q&A successfully, you reset to some random password and give that to them. Then they have the option of changing it to another password through your "change password" process.
Basically there isn't a thing tricky here, just a few forms or dialogs:
Logon
Forgot My Password
Change My Password
Storing hashed passwords is another topic, but one you should address anyway. If not, then anyone who gets hold of your user/pw store (whether it's in a database or anything else) can steal everyone's identity.
http://blog.moertel.com/articles/200...-in-a-database
Re: forgot password form in vb6?
that is the thing that i would like to ask
Re: forgot password form in vb6?
i need some help please
post any sample code pls
i have a login form and register form using module..
i need some help..
for my thesis...
Re: forgot password form in vb6?
OK, it is for your thesis, right - do you expect us to do everything for you?
What have you done so far?
You haven't answered a single question that was asked by the people trying to help you in this thread. We cannot just whip up code magically without knowing certain details.
So please, help us help you!
Re: forgot password form in vb6?
Sorry! ok, i have a login form and you can also register a new username and password,
now if you forgot the your password you can retrieve, reset or change it from the other form
i'm using .urs file saving my username and password.
thank you
this is my code in register a new user using module
Quote:
Public Sub TryLogin()
On Error GoTo A
Dim user, pass, RUser, Rpass As String
user = Form1.Text1.Text
pass = Form1.Text2.Text
Open App.Path & "/Users/" & user & ".urs" For Input As #1
Input #1, RUser
Input #1, Rpass
Close #1
If user = RUser Then
If pass = Rpass Then
GoTo Login
Else
End If
End If
MsgBox "Invalid Password", vbCritical, "Invalid Info"
Exit Sub
Login:
Form3.Show
Form1.Hide
Exit Sub
A:
MsgBox "Invalid Username", vbCritical, "Invalid Info"
End Sub
Re: forgot password form in vb6?
In that case you could just look at the user.urs file with notepad and see what the password is :)
Seriously though first you need to determine what you want to do if they click the forgot password. Once you have determined that then you would try to determine how to write the code to achive the result you want.
It should be pretty easy.
Re: forgot password form in vb6?
You need to go back to the beginning; the Registration of the User in the first place.
When you register a user (or a user registers themselves) you need to save some information, vis:
1. The Username
2. The Password
3. The Question to be asked in the case the user forgets their password
4. The answer to the question
(Before storing the information you will have to make sure that the Username does not already exist)
Then, if the user selects 'Forgot Password', you just display the question, input the asnwer from the user, if their answer matches the one you've stored you can then either allocate a random password or display the current one.
Re: forgot password form in vb6?
From the looks of the current code it only works for 1 user, the first user.
Also note that you should do away with the Goto no need for it and it is not good coding practice.
Re: forgot password form in vb6?
sorry wrong code that's for log in.
this is for register
Code:
Public Sub Createuser()
On Error GoTo A
Dim user, pass As String
user = Form2.Text1.Text
pass = Form2.Text2.Text
Open App.Path & "/Users/" & user & ".urs" For Output As #1
Print #1, user
Print #1, pass
Close #1
MsgBox "Your account has been created", vbInformation, "Congratulations"
Form2.Text1.Text = ""
Form2.Text2.Text = ""
Exit Sub
A:
MsgBox "Can't Make Account", vbCritical, "Error"
End Sub