So i am working on a program that is and I am stuck. I have a login and signup system that saves new signups in a mysql database. At the start of the program I take the passwords and names and put them together in a tuple. Then i put that tuple in a list. If i wanna login it cant check a tuple in that list. Here is my code: Login:
def login():
userKnown = input("Hallo, heeft u al een account? y/n ")
if userKnown == "y":
user = input("username: ")
passw = input("password: ")
userjoin = (user,passw)
if userjoin in bigdata:
print("login succesful")
else:
print("try again")
UploadData:
def uploadData():
print("Bezig met uploaden.")
mycursor.execute("SELECT name, password FROM userData")
data = mycursor.fetchall()
bigdata.append(data)
print("Upload worked. \n")
I hope someone can help me.
A fix to the login system.
I solved it thanks to Georg Richter.
I used the Where function in select and that worked
Here is the code: