Hello I am a student and I have been researching on here for way too long to find answers to how to make this login page actually work. All the pages I have found have made them in different ways that don't work for me. Can anyone off this code push me on the right track to create this. I have got my signup page to work though.
def signup():
users = open("login_signup.txt","a")
user = []
username = input("What do you want your username to be?: ")
password = input("What do you want your password to be?: ")
user.append(username)
user.append(password)
users.write(username + "," + password)
users.write("\n")
print("You have successfully signed up")
def login():
with open("login_signup.txt","r") as users:
usersusername = input("What is your username?: ")
userspassword = input("What is your password?: ")
Btw the format off the text in the file is: username,password
Then it goes to a new line after the next person wants to create an account.
Thanks to anyone who can help :)