Advertisement
Guest User

Untitled

a guest
May 7th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. def loginValid():
  2. UsernameValidity=UserName_Entry.get()
  3. PasswordValidity=Password_Entry.get()
  4. cursor.execute('SELECT 1 FROM users WHERE username = ? AND password = ?',[UsernameValidity, PasswordValidity])
  5. LogInAttempt = cursor.fetchone()
  6. print (loginValid) # Testing to see if it works on shell
  7. if LogInAttempt:
  8. validUser = True
  9. root.config(menu=mainMenu) # changes the menu
  10. print (" One of the accounts have successfully logged in ")
  11. messagebox.showinfo("Successful Login", "You have successfully accessed our system")
  12. toFrame(welcome) # changes its frame
  13. else:
  14. print (" One of the accounts inputted the wrong credentials! ")
  15. messagebox.showinfo("Unsuccessful Login")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement