Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def loginValid():
- UsernameValidity=UserName_Entry.get()
- PasswordValidity=Password_Entry.get()
- cursor.execute('SELECT 1 FROM users WHERE username = ? AND password = ?',[UsernameValidity, PasswordValidity])
- LogInAttempt = cursor.fetchone()
- print (loginValid) # Testing to see if it works on shell
- if LogInAttempt:
- validUser = True
- root.config(menu=mainMenu) # changes the menu
- print (" One of the accounts have successfully logged in ")
- messagebox.showinfo("Successful Login", "You have successfully accessed our system")
- toFrame(welcome) # changes its frame
- else:
- print (" One of the accounts inputted the wrong credentials! ")
- messagebox.showinfo("Unsuccessful Login")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement