![]() |
|
[Tutorial] Making a login form - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Tutorial] Making a login form (/Thread-Tutorial-Making-a-login-form.html) Pages:
1
2
|
Making a login form - OrangePL - 01-31-2012 Hey all s,I was making today simple login form, thought I'd share it with you. Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection. Usages
So, let's get things started. First start with making some nice GUI, like this : ![]() If you want to, make textlabel under Login! button to show if login failed or not. Set the property of password textboxUseSystemPasswordChar to true ![]() This will prevent anyone from seeing your password. Now, let's write some code. We want it to work like this : ![]() Let's get started double clicking the 'Login!' button and adding the code checking if username / password is valid. TextBox1 is login and TextBox2 is password. Code: if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")
{
MessageBox::Show("Login succesfull!");
//do stuff
}Next thing we might like to add is what the program should do, if username / password does not match the set ones. I will use the code from above. Code: if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")
{
MessageBox::Show("Login succesfull!");
//do stuff
}
else
{
MessageBox::Show("Invalid login or password! Please try again!");
}If you have a basic knowledge in any programming language, you should be able to understand what the code does. If not, explanation is here.\ Code: if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")If something does not match our pw / login, user will get a nice 'Invalid login' box. That's it, hope you enjoyed the tutorial. If something's not clear, feel free to ask in the thread. Don't forget to press that button for more releases or tutorials! ![]() RE: Making a login form - SuperNovaAO - 01-31-2012 This is so secure. Thanks, I will use it I think. brb porting entire ItsMods db into the login.php. RE: Making a login form - OrangePL - 01-31-2012 (01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think. Quote:Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection. blind or what.. Where did I say 'It's a commercial system, with uncrackable encryption algorithm, I've written it for a bank' ? RE: Making a login form - Rendflex - 01-31-2012 (01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think. My sarcasminator has exploded! HELP! RE: Making a login form - JariZ - 01-31-2012 @SuperNovaAO
RE: Making a login form - Rendflex - 01-31-2012 (01-31-2012, 22:02)jariz Wrote: @SuperNovaAO Did you repair my sarcasminator? Oh no wait, that's not mine... mine is version 2.3... RE: Making a login form - Pozzuh - 01-31-2012 Derailed because an admin acted like a douchebag, gg RE: Making a login form - JariZ - 01-31-2012 the admin = a douchebag inb4 ban RE: Making a login form - SuperNovaAO - 02-01-2012 (01-31-2012, 21:58)OrangePL Wrote:(01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think. Code: I only read stuff in code tags.Now back to topic. RE: Making a login form - kokole - 02-01-2012 and how is possible to take a login && password from a db? Lets say, a html, that contains Usernames: and Password: |