Results 1 to 3 of 3

Thread: Password

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    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

  3. #3

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Post

    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
  •  



Click Here to Expand Forum to Full Width