Hi Everyone,

I know this sounds silly but Ive been so caught up with designing efficient logins that interact with a database that Ive forgotten how to do it the hard coded way.

I have to create a little application that interacts with a database, but it doesnt have to be so complex as its just going to be an "in-house" application if you like.

****** The problem ******

string username, password; //String variable declarations

public void validateLogin()
        {
            //Check if data entered matches correct log in details
            if (input_username == username) // && password == input_password)
                lbl_status.Text = "Test string should display if username is equal";
                //Login successful - display message
                //Set tabbed pane to visible
                //tabControl1.Visible = true;
               
            //Else display unsuccessful message
            //else lbl_status.Text = "Sorry, the details you entered were incorrect.  Try again!";
        }

// Then button click event to call the validateLogin method

Surely my approach to this is right, the aim was to keep it simple lol but I seem to have forgotten the basic algorithm.

Please help

## input_username is a string holding data entered in a textbox.text

Never mind, got her sorted! :)

just used the textbox.text directly rather than passing it to a string variable

:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.