Lil help with login screen - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Lil help with login screen

[b][red]This message was edited by Zaerough at 2003-10-20 17:37:40[/red][/b][hr]
This is what I have so far, if its lacking please bare with me I learn from working examples and I don't have any.

{
Do
strLoginID = InputBox("Enter your ID")
}

I really dont think any of that is right but when I find something on the net I have to try to work with it as is.

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : [b][red]This message was edited by Zaerough at 2003-10-20 17:37:40[/red][/b][hr]
    : This is what I have so far, if its lacking please bare with me I learn from working examples and I don't have any.
    :
    : {
    : Do
    : strLoginID = InputBox("Enter your ID")
    : }
    :
    : I really dont think any of that is right but when I find something on the net I have to try to work with it as is.
    :
    [blue]You have to do some checking if the password is a correct one or you will be in a loop forever...[/blue][code]
    int iAttempts = 3;
    int pass = 0;
    char* pstrLoginID;

    while (iAttempts--) {
    pstrLoginID = InputBox ("Enter your ID: ");
    if (strcmp (pstrLoginID, "...a correct password here...") == 0) {
    pass = 1;
    break;
    }
    }

    if (! pass) {
    // after three attempts - NO PASS!
    }
    else {
    // ACCEPTED!
    }
    [/code]
Sign In or Register to comment.