How to insert TEXT into an existing .txt file, everytime they click on the LOGIN button? With out deleting any existing text in the file. TY =D
Hello there, I have a code below, ... When you click on that BUTTON(the code button) I would like to be able to INSERT
TIME , DATE , and IP, into a TEXT file, into the next empty line, with out deleting what was inside of the text file, and then, upload that text file somewhere, .... I am going to give this software to about 14 people, and I would like to log each time they log in to it. Any other ideas? if not, how do I do this? ...
Thank you in advance for your help.
private void buttonLogin_Click(object sender, EventArgs e)
{
string password = textBoxPassword.Text;
if (SQLDataAccess.ValidateConnection("Account", password) == true)
{
SQLDataAccess.Password = password;
MessageBox.Show("Login Successful");
textBoxPassword.Text = "";
textBoxPassword.UseSystemPasswordChar = false;
FormCollection fc = Application.OpenForms;
foreach (Form ff in fc)
{
if (ff.Name == "Form1")
{
((Form1)(ff)).label1.Text = "Input Box";
}
}
}
else
{
MessageBox.Show("Login failed");
}
}