Announcement

Collapse
No announcement yet.

stuck with username password validation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • stuck with username password validation

    hello dear,

    i am trying to read username password from text file. I want to compare user input by the data stored in c:\pass\info.txt file, but i am getting the error-

    "attempt to index global." My code is as below.

    beginning_line = 1;
    end_line = 2;
    filecont = TextFile.ReadToString("c:\\pass\\", "info.txt");
    readusername = Input.GetText("user");
    readuserpass = Input.GetText("pass");
    line = beginning_line;
    result = String.Compare(readusername , filecount[1])
    Dialog.Message("Notice", result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);



    PLEASE ALSO SUGGEST ME WHICH IS THE BEST WAY TO STORE USERNAME PASSWORD. I MEAN IN WHICH FILE FORMAT? AS :-
    .INI
    .DB
    .TXT
    REGISTRY.

    THANK YOU FOR YOUR KIND HELP.

  • #2
    Originally posted by skynet1 View Post
    hello dear,

    i am trying to read username password from text file. I want to compare user input by the data stored in c:\pass\info.txt file, but i am getting the error-

    "attempt to index global." My code is as below.

    beginning_line = 1;
    end_line = 2;
    filecont = TextFile.ReadToString("c:\\pass\\", "info.txt");
    readusername = Input.GetText("user");
    readuserpass = Input.GetText("pass");
    line = beginning_line;
    result = String.Compare(readusername , filecount[1])
    Dialog.Message("Notice", result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);



    PLEASE ALSO SUGGEST ME WHICH IS THE BEST WAY TO STORE USERNAME PASSWORD. I MEAN IN WHICH FILE FORMAT? AS :-
    .INI
    .DB
    .TXT
    REGISTRY.

    THANK YOU FOR YOUR KIND HELP.
    If you look around the group you will find much better ways to deal with user accounts within your app, for one using a database, https://github.com/rexzooly/Hush-Puppy this app uses a password and option it will be a place to learn and some other Login exaples here http://www.indigorose.com/forums/thr...295#post155295

    Both of these topics I was part of this is why I know about them but using the search option of the forum will really help.
    Plugins or Sources MokoX
    BunnyHop 2021 Here

    Comment

    Working...
    X