Simple username checking

Discussion in 'ASP General' started by nix, Jun 7, 2005.

  1. nix

    nix Guest

    Hi

    I want to create a simple user validation script without using a database.

    Let's say I have a text file in my asp folder with a list of valid
    usernames. How can i do something like the following using ASP?


    // IN: sUsername

    try
    AUsernameList:=TStringlist.create;
    try
    AUsernameList.loadfromfile('usernames.txt');
    bValidUser:=IndexOf(sUsername)>=0;
    except
    // OUTPUT AN ERROR TO THE USER
    end;
    finally
    AUsernameList.free;
    end;

    // OUT: bValidUser


    Thanks

    nix
    nix, Jun 7, 2005
    #1
    1. Advertising

  2. nix

    nix Guest

    Excellent,

    Dave
    nix, Jun 9, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    2
    Views:
    2,112
  2. Chris
    Replies:
    3
    Views:
    357
    John Smith
    Sep 28, 2003
  3. Chris
    Replies:
    0
    Views:
    318
    Chris
    Sep 27, 2003
  4. Shailesh Patel
    Replies:
    0
    Views:
    438
    Shailesh Patel
    Nov 8, 2006
  5. GregO

    Simple ASP to give IP/time/username?

    GregO, Apr 5, 2007, in forum: ASP General
    Replies:
    4
    Views:
    176
    GregO
    Apr 10, 2007
Loading...

Share This Page