import sqlite3
conn = sqlite3.connect('LeVinEmployee.db')
profile = input("Are you a user? y/n: ")
if profile == 'y':
login = input("Enter login name: ")
#passw = input("Enter password: ")
c = conn.cursor()
c.execute("SELECT * FROM Employee WHERE Email = '" + login + "'")
result = c.fetchone()
if result[0] == 1:
print(c.fetchall())
else:
print("not")
else:
print("You are not a user")
What I am trying to do here is pretty simple. I am trying to create user login function. If user type 'y', program will simply ask to put login email. If user type correct email from database, print that customer information. if wrong, print 'not'. I am not sure what is wrong with my code. Can someone help me please?