Username and password help

Posts 1–9 of 9 · Page 1 of 1
Username and password help
Well im trying to make a login system that checks usernames and passwords. i can check fine against ../users/username/username.txt and password.txt
on the user's computer. but would like to check against mysql database.

Code:
If TextBox4.Text = ""Then
MsgBox("Error No Username Selected!", MsgBoxStyle.Critical)
Else
IfMy.Computer.FileSystem.DirectoryExists("c:iCodedusers" + TextBox1.Text + "") Then
Dim Userread As System.IO.StreamReader = New System.IO.StreamReader("c:iCodedusers" + TextBox1.Text + "" + "username.txt")
Dim Userline AsString
Dim Passread As System.IO.StreamReader = New System.IO.StreamReader("c:iCodedusers" + TextBox1.Text + "" + "password.txt")
Dim Passline AsString
Do
Passline = TextBox2.Text
Userline = Userread.ReadLine()
Console.WriteLine(passline)
Console.WriteLine(userline)
LoopUntil userline IsNothing
If TextBox2.Text = ""Then
MsgBox("Error Fill a password in", MsgBoxStyle.Critical)
Else
If Passline = Passread.ReadLine() = TrueThen
MsgBox("Welcome!", MsgBoxStyle.Information)
Form2.Show()
Me.Hide()
EndIf
Thats what i have so far
newfag's dont know how to code ?
Maybe combine with PHP? PHP commands are easy to combine with MYSQL..
Mother fucker, close your VB IDE right mo-effin now, if I see another line of VB written by you ima srs eat you :@
im good at vb what are you trying to do ? you just want vb to read a txt file and if the username & pass dont match to not login ?
great Job and thanks first but u don´t get one^^
Yep man , you should use PHP + mysql , first get urself a mysql server , or instal xampp on your pc , then write script for your self little example for log in without sql:
<?php
echo "<form method="post" action="">";
echo " Username: <input type="text" name="username"> <br/>";
echo " Password: <input type="password" name="password"> <br/>";
echo "<input type="submit" value="Log In">";
echo "<form/>";

$username = $_POST['username']
$password = $_POST['password']
if ($username == "OrX" && $password == "password") {
echo "Congrats you just logged in!";
}
else
{
echo "Gtfo nub , wrong username or pw!";
}
echo "Script by -OrX|=-";
?>

Good luck , i could help you out with php and stuff if you need help MSN:lauriadi@hotmail.com

-OrX|=-
I posted a basic working readfile function for you vb6 users but this thread is old and unwanted so I'm going to close it now but PM me if you have more questions.

Code:
Private Sub CheckPass_Click()
Dim variable1 As String
Open "c:username.txt" For Input As #1
Input #1, variable1
Close #1
if username.txt = variable1 then
MsgBox("Welcome!")
End Sub
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us