-
Feb 23rd, 2012, 07:16 AM
#1
Thread Starter
New Member
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!
-
Feb 23rd, 2012, 07:21 AM
#2
Re: forgot password form in vb6?
Interesting and good for you :-)
Is there a question?
Last edited by TysonLPrice; Feb 23rd, 2012 at 07:30 AM.
-
Feb 23rd, 2012, 07:54 AM
#3
-
Feb 23rd, 2012, 07:55 AM
#4
Thread Starter
New Member
Re: forgot password form in vb6?
yup! can you help for that?
thank you
-
Feb 23rd, 2012, 07:57 AM
#5
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?
-
Feb 23rd, 2012, 09:52 AM
#6
Thread Starter
New Member
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.
-
Feb 23rd, 2012, 10:12 AM
#7
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.
-
Feb 23rd, 2012, 10:18 AM
#8
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
Last edited by dilettante; Feb 23rd, 2012 at 10:22 AM.
-
Feb 23rd, 2012, 10:22 AM
#9
Thread Starter
New Member
Re: forgot password form in vb6?
that is the thing that i would like to ask
Last edited by Markee; Feb 23rd, 2012 at 10:27 AM.
Reason: wrong typing
-
Feb 24th, 2012, 08:13 AM
#10
Thread Starter
New Member
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...
Last edited by Markee; Feb 24th, 2012 at 08:18 AM.
-
Feb 25th, 2012, 04:22 AM
#11
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!
-
Feb 25th, 2012, 11:11 PM
#12
Thread Starter
New Member
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
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
-
Feb 26th, 2012, 12:59 AM
#13
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.
-
Feb 26th, 2012, 01:19 AM
#14
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.
-
Feb 26th, 2012, 02:19 AM
#15
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.
-
Feb 26th, 2012, 05:38 AM
#16
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|