PDA

Click to See Complete Forum and Search --> : Password


CyberCarsten
Nov 20th, 1999, 01:32 AM
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

spandex44
Nov 20th, 1999, 04:38 AM
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

CyberCarsten
Nov 20th, 1999, 03:28 PM
Hi again!
Yes, the user knows the old username and password.

/ CyberCarsten