how do i create a login script where i can change the password.
i have it where i can login and all but the passwords are pre-set. I also want to be able to save and load the array that holds the usernames and passwords. i know how to save and load but i dont know where to place the commands at to save it correctly. plz help someone. so far the jist of the code is below
set window on
set window title "testing password code"
dim users$(6,2)
users$(1,1)="Bob" : users$(1,2)="Test1"
users$(2,1)="Joe" : users$(2,2)="Test2"
users$(3,1)="Tuck" : users$(3,2)="Test3"
users$(4,1)="John" : users$(4,2)="Test4"
users$(5,1)="Steve" : users$(5,2)="Test5"
users$(6,1)="Tom" : users$(6,2)="Test6"
0:
rem login
cls
input "Please enter your username:";name$
for x=1 to 10
if name$=users$(x,1)
input "Enter password>";pass$
if pass$=users$(x,2) then goto 100 else goto 1
endif
next x
rem if wrong username
Wrong:
print "That username doesn't exist."
sleep 2000
goto 0
rem if wrong password
1:
print "Wrong Username/Password combination"
sleep 2000
goto 0
rem if username and pass correct
100:
cls
Print "1. Play Game"
Print "2. Change Password"
Print "3. Logout"
Input "What do you want to do?[1-3]";answer$
if answer$="1" then goto Game
if answer$="2" then goto Change
if answer$="3" then End
Change:
rem change password
print "you will be able to change your password. i dont how to do this yet."
Game:
cls
Print "Game is under construction"
if someone could please edit this code so that i can change passwords it would help a lot. thx in advance. hope to get some help on this one.
Current Status: Learning DBPro
I consider myself: ULTRA NEWB!!!!!!!!!!!