Gulafsan Shaheen
4 Mar 2022
Python
I am making a login system by which a user can generate username and password which will be inserted into a database, in the "CreateAccount" table. However when I run the program and try to create a username and password, the program says that the table "CreateAccount" does not exist. How do I fix this?
create = input("Would you like to create an account or re-enter Username?\nEnter 1 to re-enter, Enter 2 to create ")
if create == "1":
set_up()
if create == "2":
New_Username = input("Enter a username: ")
New_Password = input("Enter a password: ")
conn = sqlite3.connect('Database = NEA_quiz_database.db;'
'Trusted_Connection = yes;')
cursor = conn.cursor()
cursor.execute("""
INSERT INTO CreateAccount (UserID, Password)
VALUES(New_Username, New_Password)
""")
conn.commit()
© 2023 Copyrights reserved for web-brackets.com