|
-
Nov 20th, 1999, 02:32 AM
#1
Thread Starter
Frenzied Member
I have made a small
password program.
But there are only one username
and password.
I want the use to change the
username and password.
How do i do that???
I use the following code and components:
1 cmdButton (caption = Login)
2 TextFields
Code:
Command1 code:
if text1.text="123" and text2.text="abc" then
msgbox"Correct login"
else
msgbox"Incorrect login"
end if
*************************************************
/ CyberCarsten
-
Nov 20th, 1999, 05:38 AM
#2
Hyperactive Member
I'm not sure if I understood your question correctly. The way I understood it was that you want the user to be able to change the username and password. Does he/she have to know the current username and password?
There's some code below that allows the user to change the username/password without knowing the old ones. If you want to know how to do that too, tell me.
Create 2 more text boxes and 1 more command button (text3, text4, and Command2).
Gerneral Declarations
dim username
dim password
Command2_Click()
username = text3.text
password = text4.text
Command1_Click()
if text1.text = username and text2.text = password then
msgbox "Correct login"
else msgbox "Incorrect login"
End if
I hope this helps.
Regards,
Alexander McAndrew,
VB Zone http://vbzone.webprovider.com
-
Nov 20th, 1999, 04:28 PM
#3
Thread Starter
Frenzied Member
Hi again!
Yes, the user knows the old username and password.
/ CyberCarsten
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
|