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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.